RabbitMQ is an open-source message broker implementing AMQP 0-9-1 (Advanced Message Queuing Protocol), originally built for financial services messaging in 2007 and now maintained by VMware Tanzu. It provides reliable, asynchronous communication between distributed systems by routing messages through exchanges to queues, where consumers retrieve them. RabbitMQ is widely used for task queues, pub/sub patterns, RPC, and event-driven architectures, supporting millions of deployments worldwide. A key mental model: think of RabbitMQ as a post office — publishers mail messages to exchanges (routing hubs), which use binding rules to deliver them to queues (mailboxes), where consumers pick them up. Understanding the separation between exchanges and queues is critical: unlike simple queue systems, RabbitMQ's routing layer enables powerful patterns like topic-based subscriptions, load balancing, and failover.
What This Cheat Sheet Covers
This topic spans 15 focused tables and 105 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Core AMQP Protocol Concepts
| Concept | Example | Description |
|---|---|---|
Protocol version used by RabbitMQ | • Binary protocol defining message framing, connection negotiation, and delivery semantics • Native to RabbitMQ with broad client library support | |
TCP connection to broker | • Physical TCP link between client and RabbitMQ node • Expensive to establish (handshake, TLS, AMQP negotiation) • Reuse across multiple channels | |
Virtual connection inside TCP | • Lightweight virtual connection multiplexing a single TCP connection • Default limit: 2047 channels per connection • Best practice: one channel per thread | |
/production or /staging | • Logical isolation providing separate namespace for exchanges, queues, bindings, and users • Enables multi-tenancy on single broker | |
orders.exchange | • Routing entity receiving messages from publishers and distributing to queues based on type/rules • Publishers send to exchanges, not queues directly | |
invoice.processing | • Message buffer storing messages until consumed • Consumers subscribe to queues, not exchanges • FIFO by default (priority queues available) |