Explain like I'm five · SRE

What is a Dead-letter Queue?

A dead-letter queue, told as a story about a small box set aside for orders that keep failing.

ORDER BASKETfailed again!can't recognize the ingredient nameone order keeps failing, so it just keeps getting retried

One order keeps failing, so it just keeps getting retried.It can't recognize the ingredient name.

this one keeps jammingeveryone behind is stuckretrying a broken order forever jams the whole line

Why: retrying a broken order forever jams the whole line.Everyone behind is stuck.

NORMAL BASKET×3 failedUNCLAIMED BOXan order that keeps failing gets set aside, so the rest keep flowing

An order that keeps failing gets set aside, so the rest keep flowing.The set-aside ones get checked by a person later.

Decide how many retries to allowset a limit in advance
Past that limit, set it asidethe rest of the line keeps moving
A person checks it laterit isn't just discarded automatically
Write down why it failedmakes it easier to fix next time
NORMAL BASKETUNCLAIMED BOXmoved after ×3 retriesafter a few more tries, set it aside for a person to check

A small unclaimed box beside the normal basket — moved there after ×3 retries.After a few more tries, it's set aside for a person to check.

UNCLAIMED BOXif no one checks, it's as good as thrown awayan unclaimed box nobody checks is as good as discarded

An unclaimed box nobody checks is as good as discarded.Someone must check it regularly.

In one breath

A dead-letter queue: a separate box for orders that fail even after retries — so the rest of the line keeps flowing, unblocked.

You set a cap on retries, and move any message past that cap (a poison message) here. Setting it aside isn't the end — wire up an alert so a person sees it, fix the cause, and reprocess it. Reprocessing safely requires idempotency.

When grown-ups say it

Dead-letter Queue
The basket nobody came to claim. A separate place for messages that keep failing.
Max Retry Count
The number of retries decided on in advance. Past this, the message moves to the dead-letter queue.
Message Queue
The basket that holds order slips. → the basket that holds the order slips
Poison Message
A message that keeps failing no matter what. It goes to the dead-letter queue once it exceeds the retry cap.
Alerting
Notifying a person when something lands in the box. → how many rings mean a real emergency
Reprocessing
Fixing the cause and putting the message back in the queue. Putting it back blindly can just fail again.
Idempotency
The property that lets you safely resend the same thing. Essential when reprocessing. → you can't ride twice on the same ticket
Observability
The ability to look inside the baskets and boxes. → looking in through three kinds of signals
Next story
Slowing the Entrance for a Moment →
Want another term as a picture book? Request →