A dead-letter queue (DLQ) is a holding area where messages or tasks land when they fail to process. Rather than disappearing or blocking everything behind them, the failed item is moved aside so the rest of the work keeps flowing and the problem can be looked at later.
Think of a post office. Most letters get delivered, but a few have a bad address or no stamp. The carrier does not throw those away and does not let them stop the route, they go into a separate bin to be sorted out by hand. A dead-letter queue is that bin for software. It usually sits behind a message queue and kicks in after retry logic has tried a few times and given up.
The bin only helps if you remember to empty it. A queue that quietly fills with thousands of failed orders nobody is watching is worse than no queue at all, because it hides a problem while feeling safe. So the count in the dead-letter queue belongs on a dashboard with an alert, the same way you would watch a smoke detector rather than wait to smell smoke.
It also pays to keep why each item failed, not just the item itself. A message tagged with its error, the time, and how many tries it survived turns a pile of mystery records into a readable list. Half failed on a payment timeout you can replay, half on a malformed field you have to fix at the source. Without that context, working through the queue is guesswork.
What you do with the queue matters as much as having it. Good setups alert a person, keep the original message intact, and allow a replay once the underlying issue is fixed. That turns a silent failure into a visible, fixable one.
At TopDevs we wire a dead-letter queue into client automations so that when something genuinely breaks, the record waits safely for a human instead of vanishing without anyone noticing.