Skip to content
Tutorials Center
My learning

Topics

RabbitMQ Tutorial

Learn RabbitMQ step by step: 37 lessons in 9 chapters with examples, quizzes, diagrams and projects.

Start learning →

of lessons completed

Getting Started

  1. 1 What Is RabbitMQ? Learn what RabbitMQ is, what a message broker does, how producers, queues and consumers fit together, and when RabbitMQ is the right tool.
  2. 2 Messaging Concepts and Patterns Understand the core ideas behind message brokers: synchronous vs asynchronous calls, point-to-point vs publish/subscribe, delivery guarantees and idempotency.
  3. 3 Installing and Running RabbitMQ Install and start RabbitMQ with Docker or a package manager, learn the default ports and the guest user, and understand AMQP connection URIs.
  4. 4 Hello World: Publish and Consume Write your first RabbitMQ producer and consumer with Python pika, understand every call, and practice with a runnable in-memory stand-in broker.
  5. 5 Management UI and CLI Tools Tour the RabbitMQ management UI, learn the key rabbitmqctl and rabbitmq-diagnostics commands, and read queue statistics from the HTTP API.

AMQP and Architecture

  1. 6 The AMQP 0-9-1 Model Learn the AMQP 0-9-1 model used by RabbitMQ: exchanges, queues, bindings, routing keys, frames and the wire protocol, with runnable Python stand-ins.
  2. 7 Connections and Channels Understand why RabbitMQ has both connections and channels, how multiplexing works, what closes a channel, and how many of each you should open.
  3. 8 Message Properties and Anatomy Learn what is inside a RabbitMQ message: body, routing key, properties such as delivery_mode, correlation_id, headers and expiration, and how to serialize payloads.
  4. 9 Inside the Broker: Erlang, Nodes and Storage A tour of RabbitMQ internals: Erlang processes, nodes and the metadata store, how messages are stored, and the memory and disk alarms that throttle publishers.

Queues and Exchanges

  1. 10 Queues in Depth Master RabbitMQ queues: declare options, durable vs persistent, exclusive and auto-delete queues, server-named queues, FIFO behavior and consumer prefetch.
  2. 11 Exchanges Overview Learn what RabbitMQ exchanges do, the four built-in types, the default and predeclared exchanges, the mandatory flag and alternate exchanges.
  3. 12 Bindings and Routing Keys Understand RabbitMQ bindings: how queue_bind links exchanges to queues, the difference between routing key and binding key, multiple bindings and unbinding.
  4. 13 Queue Types: Classic, Quorum and Streams Compare RabbitMQ classic queues, quorum queues and streams: how each stores data, replication and Raft majorities, and which type to choose.
  5. 14 Queue Arguments: TTL, Length and Dead Letters Use RabbitMQ queue arguments and policies: message and queue TTL, length limits, overflow behavior, dead letter exchanges and the x-death header.

Routing Patterns

  1. 15 The Direct Exchange Learn the RabbitMQ direct exchange: exact-match routing, multiple bindings, log severity routing with pika, and where direct exchanges fit best.
  2. 16 Fanout and Publish/Subscribe Build publish/subscribe with the RabbitMQ fanout exchange: broadcasting to every bound queue, temporary subscriber queues, and fanout versus work queues.
  3. 17 The Topic Exchange Master the RabbitMQ topic exchange: dotted routing keys, the * and # wildcards, worked matching examples, naming conventions and common pitfalls.
  4. 18 Headers and the Default Exchange Route on message headers with the RabbitMQ headers exchange and x-match, understand the default exchange, and pick the right exchange type for each job.

Reliability and Acknowledgements

  1. 19 Publisher Confirms and Returns Learn how RabbitMQ publisher confirms, the mandatory flag and basic.return tell a producer whether a message was really accepted, with pika code and a runnable simulation.
  2. 20 Consumer Acknowledgements and Prefetch Understand RabbitMQ manual acknowledgements, basic.nack, requeueing, redelivery and the prefetch (QoS) limit, with pika examples and a runnable delivery simulation.
  3. 21 Durability and Persistent Messages Learn what survives a RabbitMQ restart: durable exchanges and queues, delivery_mode 2 persistent messages, transient queues, lazy behavior and the full checklist for no message loss.
  4. 22 Dead Letter Exchanges, TTL and Retries Learn RabbitMQ dead lettering: x-dead-letter-exchange, the x-death header, message TTL, delivery limits and the delayed retry queue pattern, with a runnable simulation.

Clustering and High Availability

  1. 23 Clustering Fundamentals Learn how a RabbitMQ cluster works: nodes, the Erlang cookie, shared metadata, queue leaders, required ports, joining nodes with rabbitmqctl and why you want an odd node count.
  2. 24 Quorum Queues Learn RabbitMQ quorum queues: Raft replication, leaders and followers, declaring x-queue-type quorum, delivery limit, differences from classic queues and a runnable majority-commit simulation.
  3. 25 RabbitMQ Streams Learn RabbitMQ streams: append-only replicated logs, non-destructive reads, consumer offsets, retention, super streams and when to choose a stream instead of a queue.
  4. 26 Network Partitions and Client Failover Learn what a RabbitMQ network partition is, how pause_minority and autoheal work, why majority protocols help, and how clients and load balancers reconnect after a node failure.

Patterns: RPC, Work Queues

  1. 27 Work Queues and Fair Dispatch Build a RabbitMQ work queue with competing consumers: round-robin dispatch, fair dispatch with prefetch 1, acks, scaling workers, single active consumer, and a runnable simulation.
  2. 28 RPC with Reply Queues Implement request-reply (RPC) over RabbitMQ with reply_to and correlation_id, exclusive callback queues, Direct Reply-To, timeouts and the trade-offs, with a runnable simulation.
  3. 29 Publish/Subscribe and Event Fanout Design event-driven systems with RabbitMQ publish/subscribe: one queue per subscribing service, fanout and topic exchanges, competing consumers per service, event naming and the outbox pattern.

Operations and Monitoring

  1. 30 Management UI, HTTP API and CLI Tools Learn to operate RabbitMQ with the management plugin, its HTTP API and the CLI tools rabbitmqctl, rabbitmq-diagnostics, rabbitmq-queues and rabbitmq-plugins, with runnable parsing examples.
  2. 31 Monitoring and Prometheus Monitor RabbitMQ with the rabbitmq_prometheus plugin: key metrics for queues, consumers, memory, disk and connections, scrape setup, Grafana dashboards and practical alert rules.
  3. 32 Flow Control and Resource Alarms Understand how RabbitMQ protects itself: credit-based flow control, the memory high watermark, the disk free limit, blocked connections, and how to tune and react to alarms.
  4. 33 Security: Users, Virtual Hosts and TLS Secure RabbitMQ: replace the guest user, create virtual hosts, grant configure/write/read permissions with regular expressions, topic permissions, user tags and TLS listeners.

Projects and Practice

  1. 34 Project: Order Processing Pipeline Design and build an event-driven order pipeline with RabbitMQ: topic exchange, per-service quorum queues, retries, a dead letter queue, publisher confirms, and a runnable mini-broker simulation.
  2. 35 Project: Task Queue with Retries and Idempotency Build a reliable background-job system on RabbitMQ: durable work queue, exponential backoff retry queues, a parking lot, idempotency keys and graceful shutdown, with a runnable simulation.
  3. 36 Practice: Troubleshooting Stuck Queues Practice diagnosing RabbitMQ problems from symptoms: growing ready or unacked counts, missing consumers, unroutable messages, blocked connections, redelivery loops and PRECONDITION_FAILED.
  4. 37 Practice: Design Review and Pattern Choices Practice RabbitMQ architecture decisions: queue or stream, quorum or classic, work queue or pub/sub, RPC or events, and a production design checklist, with worked scenarios and runnable helpers.