Author |
Message
|
netstopmsg |
Posted: Fri May 19, 2006 9:38 pm Post subject: why msg can't come into dead letter queue in MQ5.3? |
|
|
Newbie
Joined: 26 Apr 2006 Posts: 5
|
I set up the QMs like this:
---------------------------------------------------------------------
crtmqm QM_test1
crtmqm QM_test2
strmqm QM_test2
runmqsc QM_test2
DEFINE CHANNEL ('test1.to.test2') CHLTYPE(RCVR) TRPTYPE(TCP) replace
DEFINE LISTENER ('test2_1600') TRPTYPE (TCP) PORT(1600) replace
start listener ('test2_1600')
(for MQ5.3,there is no listener in command line,I just do it in Explorer)
define qlocal('Q2') replace
def qalias('Q.IN') TARGQ('Q2') replace
end
strmqm QM_test1
runmqsc QM_test1
DEFINE QLOCAL ('QM_test2') USAGE (XMITQ) replace
define qlocal('dead.letter.queue') like(SYSTEM.DEAD.LETTER.QUEUE) replace
alter QMGR DEADQ ('dead.letter.queue')
DEFINE CHANNEL ('test1.to.test2') CHLTYPE(SDR) CONNAME ('localhost(1600)') XMITQ ('QM_test2') TRPTYPE(TCP) replace
start channel('test1.to.test2')
define qremote('Q1') rname('Q2') rqmname('QM_test2') xmitq('QM_test2')
end
-----------------------------------------------------------------------------------
then i set Q2's maxDepth =3 ,I just put Q1 4 msgs,
so I can see that the curdepth of Q2 is 3.
but the QM_test1's dead.letter.queue's depth remain 0.
I also set Q2's put disabled,then put some msgs to Q1,but the QM_test1's ddead letter queue remains 0.
why the dead letter queue can't work?
thank you! |
|
Back to top |
|
 |
wschutz |
Posted: Sat May 20, 2006 1:49 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
(1) You should create a dead letter queue on each qmgr, in this example I think the message would go to a DLQ on QM_test2 .
(2) You need to tell the qmgr about the dead letter queue:
ALTER QMGR DEADQ('dead.letter.queue')
(3) By default, non-persisten messages that can't be delivered are discarded by the channel (see NPMSPEED). Change your definition:
define qremote('Q1') rname('Q2') rqmname('QM_test2') xmitq('QM_test2') defpsist(yes) _________________ -wayne |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat May 20, 2006 5:13 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And after notifying the qmgr about the new DLQ you might have to restart it for it to pick up on the new DLQ.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
wschutz |
Posted: Sat May 20, 2006 8:18 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
fj, I think restarting the channel would suffice ..... _________________ -wayne |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat May 20, 2006 12:12 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
wschutz wrote: |
fj, I think restarting the channel would suffice ..... |
Not if he has a trigger monitor running... You would need to restart all processes that might access the DLQ and have it currently open for output. I found it more convenient to have a 5 min scheduled downtime and restart the QM. Makes it easier as well to handle application group expectations. _________________ MQ & Broker admin |
|
Back to top |
|
 |
netstopmsg |
Posted: Sun May 21, 2006 10:19 pm Post subject: |
|
|
Newbie
Joined: 26 Apr 2006 Posts: 5
|
wschutz wrote: |
(1) You should create a dead letter queue on each qmgr, in this example I think the message would go to a DLQ on QM_test2 .
(2) You need to tell the qmgr about the dead letter queue:
ALTER QMGR DEADQ('dead.letter.queue')
(3) By default, non-persisten messages that can't be delivered are discarded by the channel (see NPMSPEED). Change your definition:
define qremote('Q1') rname('Q2') rqmname('QM_test2') xmitq('QM_test2') defpsist(yes) |
thank both of you ,then I modified the sentences like this:
---------------------------------------------------------------------------------
crtmqm QM_test1
crtmqm QM_test2
strmqm QM_test2
runmqsc QM_test2
DEFINE CHANNEL ('test1.to.test2') CHLTYPE(RCVR) TRPTYPE(TCP) replace
DEFINE LISTENER ('test2_1600') TRPTYPE (TCP) PORT(1600) replace
start listener ('test2_1600')
define qlocal('Q2') replace
alter ql('Q2') maxDepth(3)
define qlocal('dead.letter.queue') like(SYSTEM.DEAD.LETTER.QUEUE) DEFPSIST(YES) replace
alter QMGR DEADQ ('dead.letter.queue')
def qalias('Q.IN') TARGQ('Q2') replace
end
strmqm QM_test1
runmqsc QM_test1
DEFINE QLOCAL ('QM_test2') USAGE (XMITQ) replace
define qlocal('dead.letter.queue') like(SYSTEM.DEAD.LETTER.QUEUE) DEFPSIST(YES) replace
alter QMGR DEADQ ('dead.letter.queue')
DEFINE CHANNEL ('test1.to.test2') CHLTYPE(SDR) CONNAME ('localhost(1600)') XMITQ ('QM_test2') TRPTYPE(TCP) replace
start channel('test1.to.test2')
define qremote('Q1') rname('Q2') rqmname('QM_test2') xmitq('QM_test2') defpsist(yes)
end
--------------------------------------------------------------------------------
after I amqsput Q1 QM_test1 some values, I check both dead letters and
queues,there is no data.
there is no data for amqsget Q2 QM_test2.
(I restart the QMs)
what is the problem?puzzling  |
|
Back to top |
|
 |
kevinf2349 |
Posted: Mon May 22, 2006 5:27 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Does the channel ever go into 'running' state?
Is there anything in the MQ log?
Any FDC's created? |
|
Back to top |
|
 |
netstopmsg |
Posted: Tue May 23, 2006 6:41 pm Post subject: |
|
|
Newbie
Joined: 26 Apr 2006 Posts: 5
|
kevinf2349 wrote: |
Does the channel ever go into 'running' state?
Is there anything in the MQ log?
Any FDC's created? |
oh....no,I made a so stupid mistake...problem has been solved. msgs will go to the receiver's dead letter queue.
thanks wschutz
fjb_saper
kevinf2349
 |
|
Back to top |
|
 |
|