RabbitMQ is a lightweight, reliable, scalable, and portable
message broker based on the AMQP protocol.
Spring uses RabbitMQ to communicate through the Advanced Message
It's not based on JMS
The headers and properties of the message are basically key/value
pairs. The difference between them is that headers are defined by
the AMQP specification whereas properties can contain arbitrary,
Question - How are the messages routed from the exchange to the
First, the queue has to be attached to the given
exchange. Typically, a consumer creates a queue and attaches it to an
exchange at the same time. Second, messages received by the exchange
have to be matched to the queue - a process called "binding".
Direct - The binding key must match the routing key exactly -
no wildcard support.
Topic - Same as Direct, but wildcards are allowed in the
binding key. '#' matches zero or more dot-delimited words and '*'
matches exactly one such word.
Fanout - The routing and binding keys are ignored - all
published messages go to all bound queues.
e.g. Publisher sends a message with a routing key of "BSE" to a
topic exchange called "StockEx". If a consumer creates a queue
attached to "StockEx" with a binding key of "#", "*", or "BSE", then
that consumer will get the message because all three binding keys
match "BSE". However, if the message is published to a direct
exchange, then the consumer will not get the message if the binding
key is "#" or "*" since those characters are treated as literals,
not wildcards. Interestingly, "#.#" will also match "BSE" despite
the routing key not having a dot.