顯示具有 MQ Config 標籤的文章。 顯示所有文章
顯示具有 MQ Config 標籤的文章。 顯示所有文章

星期四, 1月 11, 2024

An example DLQ handler rules table

Dead-letter Queue use by IBM MQ Channels

On IBM MQ for IBM i, you invoke the DLQ handler by setting the STRMQMDLQ command

STRMQMDLQ UDLMSGQ(ABC1.DEAD.LETTER.QUEUE) SRCMBR(QRULE) SRCFILE(library/QTXTSRC) MQMNAME(MY.QUEUE.MANAGER) The examples apply to the DLQ called ABC1.DEAD.LETTER.QUEUE, owned by the default queue manager. https://www.ibm.com/docs/en/ibm-mq/9.3?topic=table-example-dlq-handler-rules An example DLQ handler rules table An example dead-letter queue rules table for the runmqdlq command, containing a single control-data entry and several rules. ************************************************************************* * An example rules table for the runmqdlq command * ************************************************************************* * Control data entry * ------------------ * If no queue manager name is supplied as an explicit parameter to * runmqdlq, use the default queue manager for the machine. * If no queue name is supplied as an explicit parameter to runmqdlq, * use the DLQ defined for the local queue manager. * inputqm(' ') inputq(' ') * Rules * ----- * We include rules with ACTION (RETRY) first to 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 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 are always sending 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 never do things by half measures. If * the queue manager BBBB.1 is unavailable, try to * send the message to BBBB.2 DESTQM(bbbb.1) + action(fwd) fwdq(&DESTQ) fwdqm(bbbb.2) header(no) * The CCCC corporation considers itself very security * conscious, and believes that none of its messages * will ever end up on one of our DLQs. * Whenever we 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 run the risk of being * lost when a queue manager terminates. If an application * is sending nonpersistent messages, it should 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 don't 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)

星期四, 5月 22, 2008

WebSphere MQ Clustering Configuration Tips | Business Systems | IBM Systems Magazine


WebSphere MQ Clustering Configuration Tips | Business Systems | IBM Systems Magazine



A, B, C, D, and E: STRSBS SBSD(QMQM/QMQM)

A: CRTMQM MQMNAME(QMGR.A)
A: STRMQM MQMNAME(QMGR.A)
A: STRMQMLSR PORT(1500) MQMNAME(QMGR.A)
A: CHGMQM MQMNAME(QMGR.A) REPOS('SAMPLE.CLUSTER')
A: CRTMQMQ QNAME(CLUSTER.QUEUE) QTYPE(*LCL) MQMNAME(QMGR.A) DEFBIND(*NOTFIXED) CLUSTER('SAMPLE.CLUSTER')
A: CRTMQMCHL CHLNAME(TO.A) CHLTYPE(*CLUSRCVR) MQMNAME(QMGR.A) CONNAME('SYSTEMA.IBM.COM(1500)') DSCITV(0) CLUSTER('SAMPLE.CLUSTER')
A: CRTMQMCHL CHLNAME(TO.B) CHLTYPE(*CLUSSDR) MQMNAME(QMGR.A) CONNAME('SYSTEMB.IBM.COM(1500)') DSCITV(0)

B: CRTMQM MQMNAME(QMGR.B)
B: STRMQM MQMNAME(QMGR.B)
B: STRMQMLSR PORT(1500) MQMNAME(QMGR.B)
B: CHGMQM MQMNAME(QMGR.B) REPOS('SAMPLE.CLUSTER')
B: CRTMQMQ QNAME(CLUSTER.QUEUE) QTYPE(*LCL) MQMNAME(QMGR.B) DEFBIND(*NOTFIXED) CLUSTER('SAMPLE.CLUSTER')
B: CRTMQMCHL CHLNAME(TO.B) CHLTYPE(*CLUSRCVR) MQMNAME(QMGR.B) CONNAME('SYSTEMB.IBM.COM(1500)') DSCITV(0) CLUSTER('SAMPLE.CLUSTER')
B: CRTMQMCHL CHLNAME(TO.A) CHLTYPE(*CLUSSDR) MQMNAME(QMGR.B) CONNAME('SYSTEMA.IBM.COM(1500)') DSCITV(0)

C: CRTMQM MQMNAME(QMGR.C)
C: STRMQM MQMNAME(QMGR.C)
C: STRMQMLSR PORT(1500) MQMNAME(QMGR.C)
C: CRTMQMQ QNAME(CLUSTER.C) QTYPE(*LCL) MQMNAME(QMGR.C) DEFBIND(*NOTFIXED) CLUSTER('SAMPLE.CLUSTER')
C: CRTMQMCHL CHLNAME(TO.C) CHLTYPE(*CLUSRCVR) MQMNAME(QMGR.C) CONNAME('SYSTEMC.IBM.COM(1500)') DSCITV(0) CLUSTER('SAMPLE.CLUSTER')
C: CRTMQMCHL CHLNAME(TO.A) CHLTYPE(*CLUSSDR) MQMNAME(QMGR.C) CONNAME('SYSTEMA.IBM.COM(1500)') DSCITV(0)

D: CRTMQM MQMNAME(QMGR.D)
D: STRMQM MQMNAME(QMGR.D)
D: STRMQMLSR PORT(1500) MQMNAME(QMGR.D)
D: CRTMQMQ QNAME(CLUSTER.D) QTYPE(*LCL) MQMNAME(QMGR.D) DEFBIND(*NOTFIXED) CLUSTER('SAMPLE.CLUSTER')
D: CRTMQMCHL CHLNAME(TO.D) CHLTYPE(*CLUSRCVR) MQMNAME(QMGR.D) CONNAME('SYSTEMD.IBM.COM(1500)') DSCITV(0) CLUSTER('SAMPLE.CLUSTER')
D: CRTMQMCHL CHLNAME(TO.B) CHLTYPE(*CLUSSDR) MQMNAME(QMGR.D) CONNAME('SYSTEMB.IBM.COM(1500)') DSCITV(0)

E: CRTMQM MQMNAME(QMGR.E)
E: STRMQM MQMNAME(QMGR.E)
E: STRMQMLSR PORT(1500) MQMNAME(QMGR.E)
E: CRTMQMQ QNAME(CLUSTER.E) QTYPE(*LCL) MQMNAME(QMGR.E) DEFBIND(*NOTFIXED) CLUSTER('SAMPLE.CLUSTER')
E: CRTMQMCHL CHLNAME(TO.E) CHLTYPE(*CLUSRCVR) MQMNAME(QMGR.E) CONNAME('SYSTEME.IBM.COM(1500)') DSCITV(0) CLUSTER('SAMPLE.CLUSTER')
E: CRTMQMCHL CHLNAME(TO.B) CHLTYPE(*CLUSSDR) MQMNAME(QMGR.E) CONNAME('SYSTEMB.IBM.COM(1500)') DSCITV(0)