IBM Support

Setting up and using the WebSphere MQ Dead Letter Queue handler on iSeries

Troubleshooting


Problem

This document explains how to set up and use the WebSphere MQ (WMQ) Dead Letter Queue (DLQ) handler on IBMi.

Resolving The Problem

You must create a rules table, add the desired rules, and start the dead letter queue handler.


Create a member of a source file, for example, QRULE in <QMGRLIB>/QMQSC and then add the control data and rules.

Use the STRMQMDLQ command to invoke the Dead Letter Queue (DLQ) handler. If you do not specify a dead letter queue or a queue manager name, the default queue manager is used along with the
DLQ that belongs to that queue manager. The STRMQMDLQ command takes its input from the rules table.

1. CRTSRCPF FILE(<QMGRLIB>/QMQSC) MBR(QRULE) TEXT('Websphere MQ').
2. STRSEU SRCFILE(<QMGRLIB>/QMQSC) SRCMBR(QRULE) OPTION(2).
3. Add the control data and rules.
4. Once the control data and rules have been added, Press the F3 key to EXIT.
5. Next, press Enter to save the member.
6. To execute the rules table for a queue manager use the STRMQMDLQ command.
Example: STRMQMDLQ UDLMSGQ(SYSTEM.DEAD.LETTER.QUEUE) SRCMBR(QRULE)
SRCFILE(<QMGRLIB>/QMQSC) MQMNAME(<QMGRNAME>)

NOTE
(1): It is recommended that you submit the STRMQMDLQ command to run in batch
because the utility remains active indefinitely, by default.

(2): If a value is specified both in the rules table and on input to the STRMQMDLQ
command, the value specified on the STRMQMDLQ command takes precedence.

(3): For rules that span multiple lines, they may be concatenated with a '+' sign.

* Control Data Examples
* ---------------------
* Use the system default dead-letter queue for the default queue manager
* and leave the DLQ handler active indefinitely.
* inputqm = QUEUE MANAGER which owns Dead Letter Queue
* inputq = Name of DEAD LETTER QUEUE
* wait = Whether to wait for more messages to arrive after all messages processed on DLQ
INPUTQ (' ') INPUTQM (' ') WAIT (YES)

* Rule Examples
* -------------
* If a message is placed on the DLQ that was destined for the HOLIDAY
* queue, forward all the messages to the HOLIDAY_BACKUP queue on the
* queue manager specified in the DestQMgrName field of the MQDLH structure and
* remove the DLQ header before forwarding the message.
* NOTE: Always remove the DLQH before forwarding messages from the DLQ

DESTQ(HOLIDAY) ACTION(FWD) FWDQ(HOLIDAY_BACKUP) +
FWDQM(&DESTQM) HEADER(NO)

* If a message is placed on the DLQ because of a put inhibited
* condition, attempt to retry putting the message to its
* destination queue. Make 5 attempts at approximately
* 60-second intervals.

REASON(MQRC_PUT_INHIBITED) ACTION(RETRY) RETRY(5)

* If a message is placed on the DLQ because its destination
* queue is full, attempt to retry putting the message to its
* destination queue. Make 5 attempts at approximately
* 60-second intervals.

REASON(MQRC_Q_FULL) ACTION(RETRY) RETRY(5)

* If a message is placed on the DLQ and none of the above rules is match
* then use the catchall rule below. Put the message on the manual
* intervention queue for the system's default queue manager.
* The DLQH is left on the message for problem analysis.

ACTION(FWD) FWDQ(DEADQ.MANUAL.INTERVENTION)

Sample_Rules.txtSample_Rules.txt

[{"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Business Unit":{"code":"BU004","label":"Hybrid Cloud"},"Component":"Usability","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"9.0;8.0;7.1;7.0.1","Edition":"All Editions"}]

Product Alias/Synonym

WMQ MQ

Document Information

Modified date:
15 June 2018

UID

swg21622347