This section looks at the WebSphere MQ Dead Letter Queue (DLQ), what it is, and how to handle messages that are put on this queue.
Firstly, let's look at what a DLQ actually does. In one sentence, a DLQ is a queue that stores messages that cannot be routed to their correct destination(s). This occurs when, for example, the destination queue is full.
In our examples, we always define a DLQ called DEAD.LETTER.QUEUE.<QMgr-name>
.
We can check that we have a DLQ defined by displaying the attributes of the Queue Manager. So for Q Apply running on CLP-B, we would issue:
$ runmqsc QMB
: dis qmgr
The output from this command can be seen in the Issuing commands to a Queue Manager (runmqsc)—Displaying the attributes of a Queue Manager section.
To handle messages in the DLQ, we use the WebSphere MQ DLQ message handler utility called runmqdlq
. Note that we cannot simply read the messages off the DLQ and put them somewhere else, because then we would change the message...