Author |
Message
|
saneben |
Posted: Thu Mar 03, 2005 1:41 am Post subject: Dead Letter Queue |
|
|
Voyager
Joined: 04 Apr 2004 Posts: 96
|
Hi,
We have set up websphere MQ v 5.3 running on two AIX servers.
we noticed two messages in the SYSTEM.DEAD.LETTER.QUEUE and I tried to invoke the dead letter handler by running the command below and it giving the error. I need to know how to remove the messages from the DLQ.
stelink:/usr/mqm/bin
$ runmqdlq < /tmp/dlq.txt
syntax error on line 1
...WAIT
2005-03-03 11.50.12 AMQ8758: 1 errors detected in input to runmqdlq.
2005-03-03 11.50.12 AMQ8709: Dead-letter queue handler ending.
stelink:/usr/mqm/bin
$ pg /tmp/dlq.txt
REASON(*) ACTION(RETRY) WAIT(NO) |
|
Back to top |
|
 |
pgorak |
Posted: Thu Mar 03, 2005 2:04 am Post subject: |
|
|
 Disciple
Joined: 15 Jul 2002 Posts: 158 Location: Cracow, Poland
|
specify the number of tries, e.g.:
REASON(*) ACTION(RETRY) RETRY(1) WAIT(NO)
this is a naive approach anyway - what makes you believe that trying again will succeed?
Piotr _________________ ***
IBM Certified Solution Developer WebSphere MQ 5.3 |
|
Back to top |
|
 |
sanjivje |
Posted: Thu Mar 03, 2005 3:47 am Post subject: |
|
|
Newbie
Joined: 05 Nov 2001 Posts: 4 Location: india
|
hi Piotr,
Thanks for your reply. Can you tell me any other way of clearing the DLQ.
Regards
Sanjiv |
|
Back to top |
|
 |
pgorak |
Posted: Thu Mar 03, 2005 4:04 am Post subject: |
|
|
 Disciple
Joined: 15 Jul 2002 Posts: 158 Location: Cracow, Poland
|
but what do you need exactly?
The general approach is often to remove 'unimportant' messages from DLQ and move the 'important' ones to some other queue for further problem determination.
Piotr _________________ ***
IBM Certified Solution Developer WebSphere MQ 5.3 |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 03, 2005 6:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
saneben wrote: |
specify the number of tries, e.g.:
REASON(*) ACTION(RETRY) RETRY(1) WAIT(NO)
|
Saneben you have mixed lines in line 1
admissible for line 1 are:
Code: |
inputq(xxx) inputqm(zzzzz) wait(yes|no) |
So for you wait(no) should be on the first line by itself!
Reason(*) action(retry) retry(1) should be on the second line.
Enjoy  |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Mar 03, 2005 7:23 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
sanjivje wrote: |
Can you tell me any other way of clearing the DLQ. |
If you truly want to just clear it, can't you just issue the clear qlocal command? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 03, 2005 7:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
No the is a process the QMGR having a handle on the queue.
If you want to clear the DLQ use the dlqhandler
destq(*) action(discard)
Enjoy  |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Mar 03, 2005 9:21 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
fjb_saper wrote: |
No the is a process the QMGR having a handle on the queue. |
Are you saying that the qmgr always has the dead letter queue open and the clear won't work? If so, my DLQ is sitting unopened right now and the clear that I issued worked. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Mar 03, 2005 9:28 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The Qmgr will have the DLQ open for output for at least some time after it puts a message there.
How long depends, I think, on where the message came from.
I *believe* that if the message went on from a channel error, then the MCA will have the DLQ open as long as the MCA is using that channel - until either the channel goes inactive or stopped (I don't know which).
Similarly, I *believe* the DLQ will be open after an application error causes a message to go onto the DLQ only as long as the application is connected.
But this is mostly guesses. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
clindsey |
Posted: Thu Mar 03, 2005 10:09 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
In fjp_saper's case, I would guess the dlq handler has the queue open.
Charlie |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 03, 2005 2:22 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I have had cases where the clear command was not accepted to clear the DLQ.
You can't always wait around for the handles on the DLQ to clear. Anyway the qmgr always has a handle on the DLQ as it may put messages there at any time.
So the fastest way to clear the DLQ regardless of whom else is involved,
(use only in dev systems) is to run the DLQ handler with
destq(*) action(discard)
This will tell the DLQ handler to discard the messages whatever the original destination queue was (DLQ header -- destq info)
Enjoy  |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 03, 2005 2:26 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
jefflowrey wrote: |
The Qmgr will have the DLQ open for output for at least some time after it puts a message there.
How long depends, I think, on where the message came from.
I *believe* that if the message went on from a channel error, then the MCA will have the DLQ open as long as the MCA is using that channel - until either the channel goes inactive or stopped (I don't know which).
Similarly, I *believe* the DLQ will be open after an application error causes a message to go onto the DLQ only as long as the application is connected.
But this is mostly guesses. |
Now put WAS on top of MQ and as soon as WAS has put a msg to the DLQ there will be a handle on the DLQ until WAS is shutdown (never -- or MQ is shutdown too -- or planned maintenance) i.e. there is no way to do a clear....
QPasa tells me there is always 1 output process for the DLQ.... |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 03, 2005 2:30 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
clindsey wrote: |
In fjp_saper's case, I would guess the dlq handler has the queue open.
Charlie |
Sorry Charlie. When unable to use clear on the DLQ there was no handler running. We always run the handler in mode wait(no) so that it logs off and dies as soon as the work is finished.
If you run a handler in mode Wait(yes) I would have to agree with you. But why the hell would you want to do that with
Destq(*) action(discard) ?
The DLQ will give you valuable indications about what is wrong with either application code or qmgr setup. You should never set it up to always discard all messages and keep doing so whenever a new one lands on it.
Enjoy  |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Mar 03, 2005 2:50 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
fjb_saper wrote: |
QPasa tells me there is always 1 output process for the DLQ.... |
What does a display qstatus show you regarding who actually has the queue open? I wouldn't be surprised if it is QPasa and not the qmgr itself. I don't have QPasa on my system, and my dead letter queue is sitting untouched. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 03, 2005 8:52 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
here is the skinny of it:
dis qs(system.dead.letter.queue) type(handle) all
1 : dis qs(system.dead.letter.queue) type(handle) all
AMQ8450: Display queue status details.
QUEUE(SYSTEM.DEAD.LETTER.QUEUE) PID(340066)
APPLTAG(runmqtrm) TID(1)
APPLTYPE(SYSTEM) CHANNEL()
CONNAME() BROWSE(NO)
INPUT(NO) INQUIRE(YES)
OUTPUT(YES) SET(NO)
USERID(mqm)
So in fact it is the trigger monitor...(part of a healthy qmgr)
mqm 340066 1 0 00:39:36 - 0:03 /bin/runmqtrm -m MYQM -q I
NIT_QUEUE |
|
Back to top |
|
 |
|