Skip to content
BENIBIX Learn

Dead Letter Queue (DLQ)

Development🔗 Integration & AutomationIntegration Basics

Also known as DLQ, Dead-Letter Queue, Dead Letter Exchange

A side queue for failed messages. Now they stop blocking the rest.

Think of it like

Think of it like a box at the post office. Letters that cannot be sent wait there for a person.

Example

On Amazon SQS, the setting maxReceiveCount says how many tries a message gets. Jack sets it to 5, so a message that fails five times moves to his DLQ.

Why it matters

Without one, a bad message is either lost or retried forever. Both hide the real problem.

Definition

A dead letter queue is a side queue for messages that keep failing. A worker tries a message, and it fails. After a set number of tries, the message moves to the side queue. The main queue keeps flowing, so one bad message does not block the rest. A person then looks at the failed message, fixes the cause and sends it again.
After three failed tries, the message moves aside and an alarm rings.

Common mistake

Setting up a DLQ and never looking at it. Add an alarm, or failed orders pile up for weeks.

Key takeaways

  1. 1
    Set the tries. Choose how many fails moves a message.
  2. 2
    Keep the line moving. Bad messages step aside.
  3. 3
    Alarm and replay. Watch it, fix it, then send again.