The Desi Architect
Notes / Docker Sandboxes / RabbitMQ Competing Consumers Queue, Prefetch QoS & Dead Letter Exchanges
Docker Sandboxes · Tier 1: Building Blocks · Lab 18

RabbitMQ Competing Consumers Queue, Prefetch QoS & Dead Letter Exchanges

Share a queue of jobs between two workers and then break things on purpose. Kill a worker in the middle of a job and see RabbitMQ give it to the other. Send a bad message and see it land in the dead-letter queue. Restart the broker and see nothing lost. Then see why one heavy job can hold up the quick ones.

Time45 minutes
StackRabbitMQ 4.3Ports 18086
MemoryAbout 160 MB
Before thisLab 02Docker Compose in Practice
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 the competing consumers pattern and why it scales a queue.
  • Explain ack, unacked and redelivered, and why a crash loses nothing.
  • Explain prefetch and what goes wrong without a limit.
  • Explain a dead-letter queue and when a message goes there.
  • Say what durable and persistent protect you from, and what at least once delivery means for your code.

Before you start

Finish Lab 17 (Queue Basics) first. You should know what a queue, a producer and an acknowledgement are. Docker Desktop must be running.