Dead Letter Queue
ExplainedConcept
Also known as: DLQ
A special queue where messages land when they could not be processed, so they can be inspected later.
Dead Letter Queue, explained
Written by EduVerseWhat it is
A dead letter queue (DLQ) is a separate queue where a messaging system parks messages it couldn’t process. Instead of retrying a broken message forever or throwing it away, the system moves it aside after a set number of failed attempts, so the rest of the queue keeps flowing.
Why teams use it
Otherwise one malformed message can block a consumer or fill your logs with the same error in an endless loop. A DLQ keeps the main flow healthy and keeps the failed message intact, so someone can inspect it, fix the cause and send it through again. RabbitMQ, Amazon SQS and Kafka-based setups all support this pattern.
An example from work
An order message is missing its customer id, so the consumer throws an exception on it every time. After a few retries the message lands in orders.dlq, and an alert fires because that queue isn’t empty. You open the message, spot the missing field, fix the producer, and move the message back to the main queue.
Our own explanation, not a quote from the book.
In the book
Sentences from The Software Realm, Decoded that mention Dead Letter Queue, exactly as printed.
4 more passages about Dead Letter Queue in the full book
Read every conversation where Dead Letter Queue comes up, with the interactive slides and demos.
Where it fits
Error handling in messaging systems
Coverage in the book
Explained and compared with alternatives, so you know where and why it’s used.