RabbitMQ, simulated
An animated RabbitMQ broker in your browser: producers, exchanges (direct, fanout, topic, headers, default), bindings, classic and quorum queues and consumers, with every publish, route, delivery, ack, confirm and dead-lettering drawn as it happens — prefetch, requeues, TTL, max-length, priorities, DLX retry with backoff, poison messages and RPC, in guided scenarios or a topology you build.
Added
How to use it
A RabbitMQ broker in miniature that runs in this page. Producers publish to exchanges, exchanges route by binding to queues, queues hand messages to consumers, and every one of those hops is a dot moving along a wire — with the rules RabbitMQ (3.13 and 4.x, AMQP 0-9-1) follows for routing, prefetch, acknowledgements, publisher confirms, TTL, length limits, priorities and dead-lettering. Nothing talks to a real broker.
For the log-based alternative, see Kafka, simulated; the Concepts tab compares the two.
How to use it
Pick a scenario and press Start. Each step does something — publishes, changes a consumer, crashes one — plays for a few simulated seconds and pauses with an explanation and links to the RabbitMQ documentation. Next step moves on, Back rewinds (the simulator is deterministic, so it replays the earlier steps), Step ⇥ advances to the next single event and ⏭ to the end of the step. Space plays and pauses; → is the next step. Speed runs the clock from a quarter of real time to four times it; at 1× a hop between two nodes takes 0.4 s.
The scenarios:
-
Work queue — competing consumers on one queue: round-robin without prefetch, fair dispatch with prefetch 1, a worker dying with messages unacked (they come back, redelivered) and an auto-ack worker dying (they don’t).
-
Publish/subscribe — a fanout exchange with one auto-delete queue per subscriber; subscribers leaving and messages with nowhere to go.
-
Topic and headers routing — RabbitMQ’s tutorial 5 bindings (
.orange.,..rabbit,lazy.#) with its own example keys and the edge cases, then a headers exchange withx-matchall and any. -
RPC —
reply_toandcorrelation_id, replies through the default exchange, a server dying mid-request. -
Retry with backoff — reject → dead-letter exchange → a delay queue with a TTL → back to work, then one delay queue per attempt (1 s, 3 s, 6 s), a parking lot after too many tries, and why a single delay queue with per-message TTLs doesn’t work.
-
Poison messages — a requeue loop on a classic queue, rejecting to a dead-letter queue, and a quorum queue’s
x-delivery-limit. -
TTL, max-length and publisher confirms — drop-head, reject-publish (the publisher gets a nack), message TTL, an alternate exchange and a mandatory publish coming back with basic.return.
-
Priority queue —
x-max-priority, and why prefetch weakens it. -
Playground — a small topology to change as you like.
The diagram has producers on the left, then exchanges, queues and consumers. Bindings are grey wires labelled with their key (or headers arguments); dashed pink wires lead from a queue to its dead-letter exchange, dashed yellow ones to an alternate exchange, and dotted ones from the default exchange to every queue. Inside a queue, each ready message is a cell coloured by its routing key, with the head on the right; outlined cells are delivered but not yet acknowledged, faded cells are close to expiring, ↺ marks a redelivery and a number is a priority. A quorum queue is drawn stacked, for its replicas. A consumer shows its prefetch, the message it is working on with a progress bar, and how many more it holds. Messages travel as dots: orange published, blue routed, green delivered, then small dots for acks (green), nacks (red), confirms (violet), returns (yellow) and dead-lettering (pink).
Tap a node to inspect it. A producer can publish or send steady traffic and switch confirms and
mandatory on or off. An exchange lists its bindings (unbind or delete). A queue shows its
arguments and the messages in it with their properties and x-death headers (purge or delete).
A consumer’s prefetch, auto-ack, how it fails and what it does then (nack and requeue, reject to
the DLX, or republish to a retry exchange) can be changed, and it can be crashed and restarted.
Drag nodes to rearrange the diagram, and drag from the ● on an exchange onto a queue or another
exchange to bind them.
Publish sends messages from any producer with a routing key, headers (format=pdf, type=report),
body, priority, expiration and reply_to. Build the topology adds exchanges (with an alternate
exchange), queues (classic or quorum, message TTL, max length and overflow, dead-letter exchange
and routing key, max priority, delivery limit, expiry, single active consumer, auto-delete),
bindings, producers and consumers. In the Playground your topology is kept and goes into the share
link; Copy this topology into the Playground starts from any scenario’s.
⛶ Full screen (or F) gives the diagram the whole screen, with the controls in a column beside
it on a wide screen (◫ Panels hides them). Escape leaves.
Routing tester checks which bindings a routing key or a set of headers matches, binding by binding, without running anything — handy for working out a topic pattern. Concepts explains exchanges, acknowledgements and confirms, queue types (classic, quorum, streams), dead-lettering, TTL and limits, and compares RabbitMQ with Kafka.
What it models, and what it doesn’t
Modelled: the four exchange types and the default exchange, exchange-to-exchange bindings,
alternate exchanges, mandatory and basic.return; one copy per queue however many bindings match;
prefetch per consumer, round-robin dispatch, manual and automatic acknowledgement, nack and reject
with and without requeue, redelivery when a channel closes; publisher confirms (after replication
for quorum queues; a nack when a queue refuses a message); per-queue and per-message TTL expiring
at the head of the queue; x-expires; max-length with drop-head, reject-publish and
reject-publish-dlx (only ready messages count); priorities in classic queues; quorum delivery
limits; dead-lettering with x-death, x-first-death-*, dead-letter routing keys, the expiration
removed, and RabbitMQ’s rule that drops a message caught in a dead-letter cycle with no rejection;
single active consumer and auto-delete queues.
Not modelled: clustering, nodes failing and quorum leader elections (see the Raft simulator for how that works), streams, flow control and memory alarms, lazy queues, transactions, consumer priorities, the delayed-message plugin, and the exact interleaving of a real broker — time here is a simple simulated clock with a fixed hop latency.
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser; nothing you type leaves this page.