Messaging Reliability LabsHomeRabbitMQ pathKafka pathSandboxGitHub

Moving money between systems without losing it or counting it twice

A guided, interactive introduction to RabbitMQ and Kafka for people who have never used them, with the settings, edge cases and official references that experienced engineers look for. Every chapter is built around one question: what happens when something fails?

The scenario used everywhere

A partner system sends charges and payments for customer accounts. We store each one as a row in an append-only ledger, and an account's balance is charges - payments.

Networks fail, programs crash and partners resend. Every chapter shows one of those failures step by step, and the design choice that keeps the ledger correct. At the end, a reconciliation compares what the partner sent with what we stored, to prove it.

Choose a path

How each chapter works

1. Picture it

An everyday analogy before any jargon. Underlined terms show a definition on hover or tap.

2. Predict

A question about what will happen. Guessing first, even wrong, makes the answer stick.

3. Watch it happen

A step-by-step animation you control, with a narration of each step.

4. Go deeper

Why it matters, an interview-ready sentence, expert details, the matching lab code and links to the official docs.

RabbitMQ vs Kafka

RabbitMQKafka
ModelBroker routes messages to queues; a message is deleted when acked.Partitioned, replicated log; consumers track their position with offsets.
OrderingPer queue, with a single consumer.Per partition; key by entity.
ScalingCompeting consumers on a queue; prefetch limits unacked messages.Partitions are the unit of parallelism; one partition per consumer in a group.
RetriesDelay queues (TTL + dead-letter exchange) or the delayed-message plugin; DLQ.Short blocking retries keep order; retry or DLQ topics for longer ones.
ReplayAcked messages are gone: redrive the DLQ or ask the source to resend.Move the group's offsets back; safe if consumers are idempotent.
Health metricQueue depth, unacked count, DLQ depth.Consumer lag per partition, DLQ volume.
Good forWork queues, routing, per-message handling.Event streams, many independent consumers, history and replay.
One sentence"Whatever the broker, I build consumers the same way: idempotent, ack or commit after the write, capped retries with backoff, a DLQ with a redrive process, correlation IDs, and a reconciliation job."

Run the real labs

The simulators are teaching models. The repo contains two runnable labs with real brokers, Postgres and Python consumers, each with 7 to 8 exercises.

In the browser (no install): click Open in Codespaces. Docker, Python and the dependencies are set up for you. Then:

cd rabbitmq-lab && docker compose up -d     # RabbitMQ UI on port 15672
# or
cd kafka-lab && docker compose up -d && python create_topics.py   # Kafka UI on port 8080

On your machine: Docker Desktop and Python 3.11+, then follow each lab's README.

Run one lab at a time in a Codespace to keep memory comfortable.

Run the real labs

The animations are teaching models. The repo has two runnable labs with real brokers, Postgres and Python consumers.

In the browser (no install): open in GitHub Codespaces, then follow the README.

On your machine: Docker Desktop and Python 3.11+, then each lab's README.