3. The AMQP Model
AMQP is a binary, application layer protocol, designed to efficiently support a wide
variety of messaging applications and communication patterns.
The AMQP model is made up of messages that are published to exchanges.
These exchanges distribute the messages to queues based on bindings (rules).
The consumers then fetch/pull messages from these queues.
4. AMQP entities
Exchange - The component of the message broker that routes messages to
queues.
Queue - A data structure on disk or in memory that stores messages.
Binding - A rule that tells the exchange which queue the messages should be
stored in.
Routing key - The routing key is a key that the exchange looks at to decide how
to route the message to queues.
6. Types of exchanges
Direct - A direct exchange delivers messages to queues based on a message
routing key. In a direct exchange, the message is routed to the queue whose
binding key exactly matches the routing key of the message.
Topic - The topic exchange performs a wildcard match between the routing key
and the routing pattern specified in the binding.Messages can be routed to one or
many queues depending on this wildcard match.
Fanout - A fanout exchange routes messages to all of the queues that are bound
to it.
Headers - Headers exchanges use the message header attributes to do their
routing.