The Dead Letter Channel (DLC) is a sub-set subset of a queue, specifically designed to persist messages that are typically marked for deletion, providing . When a message is sent to a consumer, if the message fails to deliver, it will be routed to the DLC. This provides you with a choice on whether to delete, retrieve or reroute the messages from the DLC.
Messages can get routed to the DLC for several reasons. Listed below are some of them.
The subscriber does not acknowledge a message.
Network partitioning (split brain condition) may have occurred while delivering the message, which has interrupted the message flow.
Messages may be continuously sent to a single session, which exceeds the maximum number of deliveries allowed.
- The JMS selectors enabled for the message do not match the selectors in the subscription.
- The message has expired before the delivery.
- Message delivery rules may fail. For example, the subscriber may have enabled the no-local option.
A DLC queue is created when the first subscription is made for a specific domain (superuser or super user or tenant). By By default, the message broker retries a defined number of times when a subscriber does not acknowledge a message. Once the retry count has been breached, the message is removed from the queue and placed in the DLC. The default number of retries is set to 10, however, this value is configurable. See the section on configuring the message retry count for more information.