About this chapter
Before writing any code, let's build a clear mental model of how RabbitMQ moves a message from one place to another - the roles, the mailboxes and the rules that decide where a message ends up.
Lessons from courses
- 1 Producers, consumers and the broker Learn the three RabbitMQ roles - producer, broker, consumer - and why the producer and consumer never talk directly. The base every other concept builds on.
- 2 Queues A RabbitMQ queue is an ordered FIFO buffer that holds messages until a consumer takes them. See how ordering works and why the queue lives inside the broker.
- 3 Exchanges In RabbitMQ, a producer publishes to an exchange, never straight to a queue. The exchange decides which queues receive the message. Meet the four exchange types.
- 4 Bindings and routing keys A binding links an exchange to a queue; the routing key plus that binding decide delivery. See how RabbitMQ routes a message, with a direct-exchange example.
- 5 Messages and acknowledgements What a RabbitMQ message is - body plus properties - and how an acknowledgement lets a consumer confirm the work so the broker can safely drop the message.
- 6 Connections and channels One TCP connection to RabbitMQ carries many lightweight channels multiplexed over it. Learn channels vs connections and the rule of thumb for using each.