Dead letter queue explained

In message queueing a dead letter queue (DLQ), or dead letter topic (DLT) in some messaging systems, is a service implementation to store messages that the messaging system cannot or should not deliver.[1] Although implementation-specific, messages can be routed to the DLQ for the following reasons:

  1. The message is sent to a queue that does not exist.[2] [3]
  2. The maximum queue length is exceeded.
  3. The message exceeds the size limit.
  4. The message expires because it reached the TTL (time to live)[4]
  5. The message is rejected by another queue exchange.[5]
  6. The message has been read and rejected too many times.[6]

Routing these messages to a dead letter queue enables analysis of common fault patterns and potential software problems. If a message consumer receives a message that it considers invalid, it can instead forward it an Invalid Message Channel,[7] allowing a separation between application-level faults and delivery failures.

Management of dead letter queues typically involves monitoring and alert systems. Organizations may implement specialized handlers for automated remediation or manual processing of DLQ messages.

Queueing systems that incorporate dead letter queues include Amazon EventBridge,[8] Amazon Simple Queue Service,[9] Apache ActiveMQ, Google Cloud Pub/Sub,[10] HornetQ, Microsoft Message Queuing,[2] Microsoft Azure Event Grid and Azure Service Bus,[11] WebSphere MQ,[12] Solace Platform,[13] Rabbit MQ,[5] Confluent Cloud[14] and Apache Pulsar.[15] [16]

See also

Notes and References

  1. Web site: Dead Letter Channel. www.enterpriseintegrationpatterns.com.
  2. Book: Redkar, Arohi. Pro MSMQ: Microsoft Message Queue Programming. Apress. 2004. 1430207329. 148.
  3. Web site: Dead-letter queues. IBM. 23 February 2014.
  4. Web site: Dead Letter Exchanges — RabbitMQ. 2020-12-06. www.rabbitmq.com.
  5. RabbitMQ dead letter queue Web site: Dead Letter Exchanges. 2016-05-06. 2016-05-05. https://web.archive.org/web/20160505104043/http://www.rabbitmq.com/dlx.html. live.
  6. Web site: Amazon SQS dead-letter queues. AWS. 2023-04-14. 2023-04-14. https://web.archive.org/web/20230414162538/https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html. live.
  7. Web site: Invalid Message Channel. www.enterpriseintegrationpatterns.com. 2023-04-14. 2023-04-14. https://web.archive.org/web/20230414162539/https://www.enterpriseintegrationpatterns.com/patterns/messaging/InvalidMessageChannel.html. live.
  8. Web site: Amazon EventBridge announces support for Dead Letter Queues . Amazon . 2020-10-30 . 2024-12-17 . https://web.archive.org/web/20241217225540/https://aws.amazon.com/it/about-aws/whats-new/2020/10/amazon-eventbridge-announces-support-dead-letter-queues/ . live .
  9. Web site: Using Amazon SQS Dead Letter Queues. Amazon. 23 February 2014.
  10. Web site: Forwarding to dead-letter topics Cloud Pub/Sub. 2020-12-26. Google Cloud. en.
  11. Web site: Compare Azure messaging services. spelluru. docs.microsoft.com. en-us. 2020-01-17.
  12. Book: Böhm-Mäder, Johannes. WebSphere MQ Security: Tales of Scowling Wolves Among Unglamorous Sheep. 14 December 2011 . BoD. 68. 978-3842381506.
  13. Web site: Solace Dead Message Queues.
  14. Web site: Confluent Cloud documentation. 2021-02-12. 2021-03-04. https://web.archive.org/web/20210304102205/https://docs.confluent.io/cloud/current/connectors/dead-letter-queue.html. live.
  15. Web site: Apache Pulsar documentation.
  16. Web site: Apache Pulsar PIP-22:Dead Letter Topic. .