Chapter

Core concepts

The AMQP model behind RabbitMQ: producers, consumers, queues, exchanges, bindings, messages, connections and channels.

RabbitMQ Basics 6 Lessons from courses

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. 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. 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. 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. 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. 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. 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.
RabbitMQ Basics Go to course