Author |
Message
|
mq_crazy |
Posted: Wed Apr 27, 2005 1:27 pm Post subject: runmqdlq |
|
|
 Master
Joined: 30 Jun 2004 Posts: 295
|
I am trying to test dlq handler with a sample rules file i created. When i run its giving syntax error at ....action, but i don't see anything wrong with it. Here is my file dlq.rul
inputq('SYSTEM.DEAD.LETTER.QUEUE') +
inputqm('TEST_QM') wait(no) +
action(fwd) +
destq('LOCAL.QUEUE1') +
fwdq('LOCAL.QUEUE') +
fwdqm('TEST_QM') header(no)
I am running MQ 5.3 CSD08 on xp.
My intention is if the message is for LOCAL.QUEUE1 it should go to LOCAL.QUEUE as LOCAL.QUEUE1 doesn't exist.
I am running it as runmqdlq SYSTEM.DEAD.LETTER.QUEUE TEST_QM < dlq.rul |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Apr 27, 2005 3:29 pm Post subject: Re: runmqdlq |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
mq_crazy wrote: |
My intention is if the message is for LOCAL.QUEUE1 it should go to LOCAL.QUEUE as LOCAL.QUEUE1 doesn't exist.
|
Then create an Alias Queue for it and then you won't have to deal with messages going to the DLQ. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
mq_crazy |
Posted: Wed Apr 27, 2005 4:08 pm Post subject: |
|
|
 Master
Joined: 30 Jun 2004 Posts: 295
|
I can do that, but i am trying to test that way. I don't why it doesn't work. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Apr 27, 2005 7:28 pm Post subject: Re: runmqdlq |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mq_crazy wrote: |
.....
inputq('SYSTEM.DEAD.LETTER.QUEUE') +
inputqm('TEST_QM') wait(no) +
action(fwd) +
destq('LOCAL.QUEUE1') +
fwdq('LOCAL.QUEUE') +
fwdqm('TEST_QM') header(no)
.... |
Easy to fix .
Do a visual inspection:
Only allowed in 1st line: inputq inputqm wait
So way concatenate the rest to your first line ?
it should be
Code: |
inputq('SYSTEM.DEAD.LETTER.QUEUE') +
inputqm('TEST_QM') wait(no)
* end of line 1 start of line 2
destq('LOCAL.QUEUE1') +
action(fwd) +
fwdq('LOCAL.QUEUE') +
fwdqm('TEST_QM') header(no)
|
|
|
Back to top |
|
 |
mq_crazy |
Posted: Thu Apr 28, 2005 5:54 am Post subject: |
|
|
 Master
Joined: 30 Jun 2004 Posts: 295
|
I tried like that, now i get syntax error in line 5, i don't know where it is having problem. |
|
Back to top |
|
 |
mq_crazy |
Posted: Thu Apr 28, 2005 9:26 am Post subject: |
|
|
 Master
Joined: 30 Jun 2004 Posts: 295
|
Any help on this would be appreciated |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Apr 28, 2005 11:42 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
make the last line a blank line |
|
Back to top |
|
 |
mq_crazy |
Posted: Thu Apr 28, 2005 12:11 pm Post subject: |
|
|
 Master
Joined: 30 Jun 2004 Posts: 295
|
It worked with the blank. I don't know why its so particular about the blank line. Anyway thanks a lot fjp for your help!!! |
|
Back to top |
|
 |
mq_crazy |
Posted: Fri Apr 29, 2005 6:50 am Post subject: |
|
|
 Master
Joined: 30 Jun 2004 Posts: 295
|
One last question, might be silly. The runmqdlq program doesn't keep running in the background? i can see once it processes it shuts down. I can't keep it running whenever a message comes in dead letter? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Apr 29, 2005 7:04 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
mq_crazy wrote: |
One last question, might be silly. The runmqdlq program doesn't keep running in the background? i can see once it processes it shuts down. I can't keep it running whenever a message comes in dead letter? |
You don't want to keep it running.
Do a search on DLQH for more indepth discussion of the risks of doing this. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mq_crazy |
Posted: Fri Apr 29, 2005 7:06 am Post subject: |
|
|
 Master
Joined: 30 Jun 2004 Posts: 295
|
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Apr 29, 2005 9:30 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
There is a whooooooole chapter on this subject in the System Admin Guide. Please check it out. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Apr 29, 2005 10:49 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And after that if you still need special rules to run on a permanent basis
(the ones that have a forward in the action)
try running the DLQ handler with wait(yes) and an & as last parameter.
To stop it just get disable the DLQ.
Enjoy  |
|
Back to top |
|
 |
mq_crazy |
Posted: Fri Apr 29, 2005 2:59 pm Post subject: |
|
|
 Master
Joined: 30 Jun 2004 Posts: 295
|
|
Back to top |
|
 |
|