MachineRoom

Machine Room · 24 Aug 2026 · 8:51

Kafka vs RabbitMQ Explained: The One Difference Everything Else Falls Out Of

Watch on YouTube

Drop the same message into RabbitMQ and Kafka. Let one program read it from each. Now look: the RabbitMQ box is empty — the message was handed over and it's gone. The Kafka box still has it, readable again tomorrow. One of them forgets, one of them remembers — and every famous difference between them falls out of that one fact.

This video builds a simplified shop, puts each box in the middle of it, and follows one order. RabbitMQ is the post office: a sorting desk (exchange) copies the message into queues, delivers it to whoever is listening, and deletes it the moment the receipt (acknowledgement) comes back — the box keeps score. Kafka is the ledger: an append-only log where the message stays for seven days by default whether anyone read it or not, and every reader keeps its own bookmark (offset) — the reader keeps score.

From that one split: why Kafka can have any number of readers on one copy, why replay is "move the bookmark" in one and "ask the sender again" in the other, how ordering works (a queue vs partitions keyed by customer), and why one box does almost nothing per message. Then the question to ask instead of "which is better": is this message a piece of work, or a record of something that happened? — and why the answer is often both, with Kafka holding the record and RabbitMQ doing the work.

Chapters

  1. 0:00The Box That Forgets
  2. 1:11The 3AM Order — Why a Box at All
  3. 2:37RabbitMQ — The Post Office
  4. 4:19Kafka — The Ledger
  5. 5:55Who Keeps Score — What Falls Out
  6. 7:32Work or Record

Sources

Every product claim is quoted from rabbitmq.com and kafka.apache.org (the RabbitMQ tutorials and concepts pages — exchanges, queues, acknowledgements, push vs pull; the Kafka introduction and documentation — topics, partitions, offsets, log.retention.hours). RabbitMQ Streams (the append-only, non-destructive mode) are acknowledged in chapter 3. The shop is a simplified stand-in; nothing here describes any real company's architecture.

Get the next one by email

One email per video, with the sources. No newsletter padding, no selling the list. Leave any time.

Transcript

The narration, word for word, from the subtitle file that ships with the video.

0:00The Box That Forgets

Here are two boxes. Drop the same message into both — say, order 412 was placed. Now let one program read it from each box, and watch what's left. The box on the left is empty: the message was handed over, and it's gone. The box on the right still has it — sitting exactly where it was, readable again tomorrow. The left box is RabbitMQ. The right box is Kafka. And that — one of them forgets, one of them remembers — is the whole difference. Everything people argue about — which is faster, which scales, which one to pick — falls out of that one fact. Both get called a message queue. Both sit between programs and pass messages along. And people pick the wrong one all the time, because they compare feature lists instead of asking the one question that matters: after a message is read, who is supposed to remember that? So let's build a shop — a simplified Amazon — put each box in the middle of it, and watch what one order does to each.

1:11The 3AM Order — Why a Box at All

Start without any box. You tap Buy at three in the morning. One program takes your order — and now four things have to happen. Charge the card. Tell the warehouse. Send you an email. Update the sales numbers. The obvious way: the order program calls each of those four directly, and waits. And the obvious way breaks. If the email program is down, your order is stuck — or lost. If a sale spikes and the warehouse program slows, every order slows with it. The four are tied to the one — that's what engineers mean by coupling. So you change one thing. The order program doesn't call anyone. It writes one short message — order 412 placed — drops it into a box, and it's done; a moment later it's taking the next order. The email program, the warehouse, billing, analytics each pick the message up from the box when they're ready. A program dies? The message waits. A program's slow? The message waits. And the order program never has to know who's listening. Add a fifth program next year, and the box is the only thing that needs to hear about it. That's the box: a message broker — a middleman that holds messages between the programs that write them and the programs that read them. Now the real question: how should the box hold them? That's where the two boxes split.

2:37RabbitMQ — The Post Office

Box one. RabbitMQ calls itself a message broker, and its own docs compare the front of it to a post office. Your message goes to a sorting desk — an exchange — which copies it into one or more queues, following rules you set: this kind of message, that queue. A queue is a line: first in, first out. And here's the post-office part — RabbitMQ delivers. A program says, I'm listening — and RabbitMQ pushes each message to it as it arrives. If three copies of the email program are listening, it takes turns — one message to each, round and round. Now the handover. The program gets the message, does the job, and sends back a receipt — an acknowledgement: got it, done. The moment RabbitMQ has that receipt, it deletes the message from the queue. Done is gone. And if the program dies mid-job and no receipt ever comes? RabbitMQ notices the dropped connection, puts the message back in the queue, and hands it to another listener. Nothing is lost — but nothing is kept, either. That's a queue's contract: each message is delivered to one reader, once, and then it's gone. And notice who keeps score. The box does. It remembers which messages went out, which came back signed for, which it still owes. The reader just does the work. Which is exactly what you want when the job matters more than the history. One footnote: RabbitMQ can also run Kafka-style logs — it calls them streams — but the queue is its famous part, and that's what we're describing.

4:19Kafka — The Ledger

Box two. Kafka doesn't call itself a message queue. It calls itself an event streaming platform, and the box inside is a ledger — a log you can only add to. Your message is written at the end of a list called a topic, and it stays there. Kafka's own docs say it plainly: unlike traditional messaging systems, events are not deleted after consumption. They're deleted on a timer you set — seven days, out of the box — whether anyone read them or not. So how does a reader know where it's up to? It keeps its own bookmark. Every entry in the log has a number — its offset — and a reader's entire memory is one integer: the number of the next entry to read. Kafka doesn't push. The reader comes and pulls — give me everything after my bookmark — and moves the bookmark forward itself. Two readers, two bookmarks, and neither one cares where the other is. Nobody signs a receipt, and nothing gets deleted. And now the trick every Kafka feature comes from. Because the message is still there, a reader can move its bookmark backwards. Bug in the email program? Fix it, set the bookmark to last Tuesday, and read everything again. Want a brand-new program, say fraud detection, to see every order from the past week? Start it with its bookmark at the beginning. Kafka's own docs admit this violates the common contract of a queue — and call it essential. Same log, any reader, any time. The box just stores, in order. The readers keep score.

5:55Who Keeps Score — What Falls Out

Put the two side by side, and every famous difference falls out of that one fact. Many readers. In RabbitMQ, four programs need four queues — the sorting desk copies the message into each, and each copy is consumed and gone. In Kafka, four programs read the same log with four bookmarks: one copy, any number of readers, joining whenever they like — even one that didn't exist when the message was written. Replay. Kafka: move the bookmark. RabbitMQ: once the receipt is in, the message doesn't exist — if you want it again, you ask whoever sent it. Order. A RabbitMQ queue is first in, first out. Kafka splits a topic into partitions — separate lists — and promises order within each one: messages with the same key, say one customer's orders, always land in the same partition, in the order they came. Speed. Kafka's box does almost nothing per message — append it, hand it out — and its docs say performance is effectively constant however big the log gets. RabbitMQ's box does more per message — route it, track it, confirm it, delete it — and in return you get rich routing and a broker that can tell you exactly what's been done. So which is faster is the wrong question — one does less per message, the other does more of the work for you.

7:32Work or Record

So here's the question to ask, instead of which is better. Is this message a piece of work — or a record of something that happened? Work: send this email, resize this image, charge this card. It should be done once, by whoever's free, and then it should disappear — and you want the box chasing the receipt. That's a queue. That's RabbitMQ. A record: an order was placed, a price changed, a user clicked. Many programs will care, some of them don't exist yet, and one day you'll want to replay the week. That's a log. That's Kafka. And it's allowed to be both. The orders flow into Kafka as the record — and a small program reads that log and drops send the confirmation email into RabbitMQ as the work. That's a normal design, not a compromise: the record stays for the week, the work is done once and gone. So when someone asks — Kafka or RabbitMQ? — don't reach for a benchmark. Ask what happens to a message after it's read. One box forgets. One box remembers. Decide who should keep score — the box, or the reader — and you've already chosen.

Visuals are code-rendered motion graphics — no stock footage, no AI imagery. Narration is synthetic. How it's made.