The Desi Architect
Notes / Docker Sandboxes / Kafka Dead Letter Queue & Poison Pill Isolation
Docker Sandboxes · Tier 3: Reliability & Messaging · Lab 39

Kafka Dead Letter Queue & Poison Pill Isolation

One broken message can stop a whole partition. Run a naive consumer that gets stuck, then a consumer that retries temporary failures, sets aside the bad message in a dead-letter topic, and carries on. Then fix the message and replay it.

Time30 minutes
StackPython 3Ports 19093, 18091
MemoryAbout 1 GB
Before thisLab 37Kafka Consumer Groups, Offset Comm
Verified runWindows, Mac, LinuxBash and PowerShell
  1. 1PrepareWhat you will learn
  2. 2PredictGuess before you run
  3. 3RunStep by step
  4. 4ObserveWhat you should see
  5. 5Break itChange one thing
  6. 6Clean upLeave nothing running
On this page
  1. 00 / What You Will Learn
  2. 01 / Why It Matters
  3. 02 / What We Are Building
  4. 03 / Words You Need
  5. 04 / Predict First
  6. 05 / Step by Step
  7. 06 / What You Should See
  8. 07 / Look Inside
  9. 08 / Break It, Fix It
  10. 09 / In Real Projects
  11. 10 / Interview Corner
  12. 11 / Clean Up

00 /What You Will Learn

By the end you will be able to
  • Explain head-of-line blocking with one bad message.
  • Tell a temporary failure (retry) from a permanent one (set aside).
  • Say what a dead-letter topic should contain so a person can fix the message.
  • Replay a repaired message without confusing downstream systems.

Before you start

Finish Lab 37 (Consumer Groups) first. Docker Desktop with about 2 GB of RAM for Docker, and Python 3.