dead-letter queue handler utility (CSQUDLQH), CSQUDLQH (dead-letter queue handler utility)" /> An example DLQ handler rules table

 

An example DLQ handler rules table

Here is an example rules table that contains a single control-data entry and several rules:

*******************************************************************************
*            An example rules table for the CSQUDLQH utility                  *
*******************************************************************************
* Control data entry
* ------------------
* If no queue manager name is supplied as an explicit parameter to CSQUDLQH, 
* use the default queue manager.
* If no queue name is supplied as an explicit parameter to CSQUDLQH, use the 
* DLQ defined for the queue manager.
*
inputqm(' ')  inputq(' ')
 
* Rules
* -----
 
* The first check deals with attempted security violations.
* If a message was placed on the DLQ because the putter did not have the 
* appropriate authority for the target queue, forward the message to a queue 
* for manual inspection.

REASON(MQRC_NOT_AUTHORIZED) ACTION(FWD) +
FWDQ(DEADQ.MANUAL.SECURITY)

* The next set of rules with ACTION (RETRY) try to deliver the message to the 
* intended destination.

* If a message is placed on the DLQ because its destination queue is full, 
* attempt to forward the message to its destination queue.  Make 5 attempts at 
* approximately 60-second intervals (the default value for RETRYINT).
 
REASON(MQRC_Q_FULL) ACTION(RETRY) RETRY(5)

* If a message is placed on the DLQ because there has been a problem starting the
* application by triggering, forward the message to another queue for manual
* inspection.

REASON(MQFB_APPL_CANNOT_BE_STARTED) ACTION(FWD) +
FWDQ(DEADQ.MANUAL.TRIGGER)

* If a message is placed on the DLQ because of a put inhibited condition, attempt 
* to forward the message to its destination queue.  Make 5 attempts at 
* approximately 60-second intervals (the default value for RETRYINT).
 
REASON(MQRC_PUT_INHIBITED) ACTION(RETRY) RETRY(5)
 
* The AAAA corporation often send messages with incorrect addresses. When we find
* a request from the AAAA corporation, we return it to the DLQ (DEADQ) of the 
* reply-to queue manager (&REPLYQM). The AAAA DLQ handler attempts to 
* redirect the message.
 
MSGTYPE(MQMT_REQUEST) REPLYQM(AAAA.*) +
  ACTION(FWD) FWDQ(DEADQ) FWDQM(&REPLYQM)
 
* The BBBB corporation requests that we try sending messages to queue manager
* BBB2 if queue manager BBB1 is unavailable.
 
DESTQM(BBB1) +
  ACTION(FWD) FWDQ(&DESTQ) FWDQM(BBB2) HEADER(NO)
 
* The CCCC corporation is very security conscious, and believes that none of its 
* messages will ever end up on one of our DLQs.  If we do see a message from a 
* CCCC queue manager on our DLQ, we send it to a special destination in the CCCC 
* organization where the problem is investigated.
 
REPLYQM(CCCC.*) +
  ACTION(FWD) FWDQ(ALARM) FWDQM(CCCC.SYSTEM)
 
* Messages that are not persistent risk being lost when a queue manager terminates. 
* If an application is sending nonpersistent messages, it will be able to cope with 
* the message being lost, so we can afford to discard the message.
 
PERSIST(MQPER_NOT_PERSISTENT) ACTION(DISCARD)
 
* For performance and efficiency reasons, we like to keep the number of messages on 
* the DLQ small. If we receive a message that has not been processed by an earlier 
* rule in the table, we assume that it requires manual intervention to resolve the 
* problem.

* Some problems are best solved at the node where the problem was detected, and 
* others are best solved where the message originated. We do not have the message 
* origin, but we can use the REPLYQM to identify a node that has some interest 
* in this message. Attempt to put the message onto a manual intervention queue 
* at the appropriate node. If this fails, put the message on the manual 
* intervention queue at this node.
 
REPLYQM('?*') +
  ACTION(FWD) FWDQ(DEADQ.MANUAL.INTERVENTION) FWDQM(&REPLYQM)
 
ACTION(FWD) FWDQ(DEADQ.MANUAL.INTERVENTION)