Dead-Letter Queues are a variant of the Queue (Data Structure) provide a mechanism for handling messages that cannot be processed by the intended recipient and are an essential component of fault-tolerant and reliable systems.

These data structures are also very important to monitor/log properly to understand the types of messages that are being consistently lost.

When to Use DLQs

  • Useful in mission-critical systems where data integrity is extremely important (financial services, cybersecurity, etc)
  • DLQs are also useful in systems that process large volumes of messages as it is hard to maintain queue volume at scale

When not to use DLQs

  • Is not necessary for systems that do not require high levels of reliability or fault tolerance
  • If messages are being processed in real time and cannot be queued for later processing, a DLQ may not be suitable.

Key Tradeoffs

Durability + Fault-Tolerance vs. Complexity + Overhead


Suggested Readings

Linked Map of Contexts