// interactive learning module

RabbitMQ
from the inside out

Exchanges, queues, bindings, and the dead letter lifecycle. The internal mechanics that determine whether your messages survive — or disappear silently in production.

⚡ Add your Anthropic API key to unlock live AI tutoring in every section
01 — Exchanges & Routing

How messages actually get routed

Publishers never send to a queue — they send to an exchange. The exchange decides which queues receive the message based on type and routing key. Click each type to see how routing works.

← select an exchange type above
AI tutor — Exchanges & Routingask about routing, bindings, headers
02 — Queues & Bindings

Queue properties that matter in production

A queue is more than a buffer. Its properties — durability, exclusivity, TTL, max length — control what happens under load and after a broker restart. Click each property to understand its production impact.

← select a property above
AI tutor — Queues & Bindingsqueue properties, durability, routing
03 — Dead Letter Lifecycle

What happens when a message dies

A message becomes a dead letter when it's rejected, expires, or the queue is full. Without a DLX configured, it vanishes silently. Step through the full lifecycle.

Configure a DLX — the minimum viable setup
// When declaring the main queue, set x-dead-letter-exchange: channel.assertQueue('orders.process', { durable: true, arguments: { 'x-dead-letter-exchange': 'orders.dlx', // messages go here on death 'x-dead-letter-routing-key': 'dead', // optional: override routing key 'x-message-ttl': 30000, // 30s TTL (optional) 'x-max-length': 10000 // overflow triggers DL (optional) } }); // Declare the DLX and its dead letter queue channel.assertExchange('orders.dlx', 'direct', { durable: true }); channel.assertQueue('orders.dead', { durable: true }); channel.bindQueue('orders.dead', 'orders.dlx', 'dead');
AI tutor — Dead Letter & DLXDLQ, TTL, rejection, overflow
04 — Consumer Patterns

Prefetch, acks, and consumer fairness

Most RabbitMQ performance disasters come down to two things: prefetch count set to zero, and missing acknowledgements. Click each pattern to understand the production behaviour.

← select a pattern above
AI tutor — Consumer Patternsprefetch, acks, concurrency, poison pills
05 — Cluster & HA

Quorum queues vs classic mirroring

Classic mirrored queues are deprecated. Quorum queues are the production-safe choice for any data you care about. Here's the difference and why it matters.

Declare a quorum queue
channel.assertQueue('orders.process', { durable: true, arguments: { 'x-queue-type': 'quorum', // the key flag 'x-delivery-limit': 5 // max delivery attempts before DL } }); // Quorum queues require: // - durable: true (always) // - At least 3 nodes in the cluster for fault tolerance // - RabbitMQ 3.8+ // Check quorum queue status via management API: // GET /api/queues/%2F/orders.process // Look for: "type": "quorum", "leader": "rabbit@node1"
AI tutor — Cluster & HAquorum queues, federation, replication
06 — Production Checklist

Before you go live

Every item below is something I've found broken in a real production system. Check them off — or know why you're skipping them.

0 / 0 checked
AI tutor — Production Readinessask about anything on the checklist