Dead Letter Queue diagram template

Isolate poison messages with retries, a dead letter queue and an operator replay path.

Dead Letter Queue architecture diagramOpen in ArchBoard

Builds a new scene in your browser. Your existing scenes are not touched.

About this design

A message that can never be processed, a malformed payload or a record that violates a rule, will block a queue forever if the consumer retries it blindly. This template adds the standard safeguards. The consumer processes each message and, on failure, returns it for a limited number of retries with growing delays. After the final attempt the broker moves it to a dead letter queue, where it waits without holding up healthy traffic. An alert tells the owning team that the dead letter queue is not empty, and an operator tool lets them inspect a message, fix the bug or the data, and replay it into the main queue. Use the diagram to discuss retry budgets, distinguishing transient from permanent errors, preserving the failure reason and original headers, and treating a growing dead letter queue as an incident.

Diagram as text

This is the source of the diagram, in the ArchBoard diagram DSL. Paste it into Tools, Diagram from text to rebuild or change it.

title "Dead letter queue"
direction LR
service prod "Producer" -> queue sqs "Main queue" -> worker cons "Consumer"
cons -[retry with backoff]-> main-queue
main-queue -[after 5 attempts]-> queue sqs "Dead letter queue"
dead-letter-queue -> monitor datadog "Alert"
service tool "Replay tool" -> dead-letter-queue
tool -> main-queue

Related guides

More messaging and events templates