WebSphere MQ Adapter 6.5 | webMethods WebSphere MQ Adapter Documentation | webMethods WebSphere MQ Adapter Installation and User’s Guide Documentation | About the WebSphere MQ Adapter | Overview of Queuing Concepts | Messages | Undeliverable Message Processing
 
Undeliverable Message Processing
Occasionally, a WebSphere MQ Adapter service may not be able to process a message. For example, a listener service may receive a message that it cannot process with any of its notifications. Normal processing dictates that the adapter should roll the message back onto the queue. However, this causes the message to be placed at the top of the queue, and the message would be the next one the listener receives. This logic results in an infinite loop.
Using WebSphere MQ Adapter version 6.5 services you can specify a dead letter queue to process undeliverable messages. You can also define a backout requeue in the WebSphere MQ server to process undeliverable messages of a listener service. The Handle Backout ReQueue property determines whether to move the undeliverable messages of a listener service to the dead letter queue, or the backout requeue.
A WebSphere MQ Adapter dead letter queue does not have to be the SYSTEM.DEAD.LETTER.QUEUE but can be any queue on any queue manager. A service automatically moves any message that it deems "undeliverable" to the dead letter queue defined for that service and writes an information message to the server log.
The service uses its Deadletter Backout Threshold property in determining whether to move the message to its dead letter queue.
*For inbound services (Get, Request/Reply) and listeners, the service will examine the message's Backout Count immediately after it receives the message. If the Backout Count equals the service's Deadletter Backout Threshold property, the service moves the message to the dead letter queue.
*For outbound services (Put, Request/Reply), the Deadletter Backout Threshold property specifies the number of times the service will attempt to put the message on the queue. If the service cannot deliver the message to the queue within the specified number of attempts, the service moves the message to the dead letter queue.
When a service moves a message to its dead letter queue, it appends a "dead letter header" to the original message's payload data. This header indicates what time the message was moved and why it was moved. The header fields of a message on the dead letter queue do not contain the header fields of the original message.
If no dead letter queue is specified for inbound services or listeners, the service does not move the message. If no dead letter queue is specified for outbound services, the service writes the message to the SYSTEM.DEAD.LETTER.QUEUE.
Note:
If no dead letter queue is specified for outbound services and if the watt.MQSeries.ignore.System.Default.DeadLetterQueue property is set to true, then the failed message is not moved.
If the message cannot be moved to the dead letter queue due to a failure, the service discards the message and writes an error message to the server log.
The dead letter queue need not reside on the same queue manager as the service's target queue. However, the dead letter queue's queue manager and the target queue must reside on the same machine.