Maven Dependency
<Dependency> <groupId>Com.rabbitmq</groupId> <Artifactid>Amqp-client</Artifactid> <version>3.5.4</version></Dependency>
GitHub
Https://github.com/rabbitmq/rabbitmq-java-client/archives/master
Document
Http://www.rabbitmq.com/getstarted.html
Basic Concept Understanding
A producer a program, that sends messages.
A queue is the name for a mailbox.
A consumer is a program this mostly waits to receive messages.
The connection abstracts the socket connection, and takes care of protocol version negotiation and authe Ntication and so on for us.
A Channel is where most of the APIs for getting things do resides.
An exchange receives messages from producers and pushes them to queues.
AMQP (AdvancedMessage Queuing Protocol) are an open standard application layer Protocol for message-oriented MIDDL Eware.
RPC (Remote ProcedureCall) is a pattern, run a function on a Remote computer and wait for the result.
Hello World
1. The queue has no boundary limit and is an infinity cache.
2. If you want to connect a broker to another machine, you need to set its IP
3. A queue needs to be declared before it is sent, and is created only if the queue does not exist
4. Before receiving the message, you need to declare the queue, consumer priority to start, you need to explicitly from which queue to consume
5.
RabbitMQ Client (Java)