Author |
Message
|
md7 |
Posted: Thu Mar 15, 2012 7:53 pm Post subject: Dead letter queue handler question |
|
|
 Apprentice
Joined: 29 Feb 2012 Posts: 49 Location: Sydney.AU
|
Just a quick question. Say I have queue X and a back out queue called X.ERROR both queues are full and my application places a message on queue X, as both queues are full the message goes to the DLQ.
My DLQ handler rules table has this rule :
REASON(MQRC_Q_FULL) ACTION(RETRY) RETRY(5)
If I empty both queue X and X.ERROR, which queue will the handler put the message on? X or Q.ERROR?
cheers |
|
Back to top |
|
 |
md7 |
Posted: Thu Mar 15, 2012 7:56 pm Post subject: |
|
|
 Apprentice
Joined: 29 Feb 2012 Posts: 49 Location: Sydney.AU
|
Also is there a facility to test this? I have tried using amqsputc to place a message on a full queue but am unable to do so. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Mar 15, 2012 8:53 pm Post subject: Re: Dead letter queue handler question |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9471 Location: US: west coast, almost. Otherwise, enroute.
|
md7 wrote: |
Just a quick question. Say I have queue X and a back out queue called X.ERROR both queues are full and my application places a message on queue X, as both queues are full the message goes to the DLQ.
My DLQ handler rules table has this rule :
REASON(MQRC_Q_FULL) ACTION(RETRY) RETRY(5)
If I empty both queue X and X.ERROR, which queue will the handler put the message on? X or Q.ERROR?
cheers |
I believe you don't understand the purpose and function of a dead-letter queue. The DLQ is well-documented in the WMQ Intercommunications documentation.
Applications typically don't put messages to a dead-letter queue. Rather, it is the MCA at the receiving end of the channel that puts the message to a dead-letter queue. This presumes that the creating app MQOPENed a QRemote definition that named a transmission queue, and the message traversed a channel from sender to receiver (or equivalent).
If your app wants to put a message to the dead-letter queue directly, AND you want to process it with the dead-letter handler app, then your app must put to the DLQ a dead-letter header (MQDLH) along with the actual message (MQMD and app data payload). _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
mvic |
Posted: Fri Mar 16, 2012 4:32 am Post subject: Re: Dead letter queue handler question |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
md7 wrote: |
If I empty both queue X and X.ERROR, which queue will the handler put the message on? X or Q.ERROR? |
Try it and let us know. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 16, 2012 5:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
md7 wrote: |
Also is there a facility to test this? I have tried using amqsputc to place a message on a full queue but am unable to do so. |
The supplied amqsputc is just a sample. The source is available, modify it as you need. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 16, 2012 5:08 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vitor wrote: |
md7 wrote: |
Also is there a facility to test this? I have tried using amqsputc to place a message on a full queue but am unable to do so. |
The supplied amqsputc is just a sample. The source is available, modify it as you need. |
In general, any application issuing an MQPUT against a full queue will get an MQRC that indicates the queue is full, and the put will not succeed.
The behavior of the MCAs is that they then make decisions based on that MQRC and choose to try additional options. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Mar 16, 2012 7:42 am Post subject: Re: Dead letter queue handler question |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9471 Location: US: west coast, almost. Otherwise, enroute.
|
md7 wrote: |
My DLQ handler rules table has this rule :
REASON(MQRC_Q_FULL) ACTION(RETRY) RETRY(5)
If I empty both queue X and X.ERROR, which queue will the handler put the message on? X or Q.ERROR?
|
The dead-letter handler will attempt to put the message to the queue named in the dead-letter header - which will be the name of the queue which was full where the MCA attempted to put the message. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
md7 |
Posted: Sun Mar 18, 2012 1:15 pm Post subject: |
|
|
 Apprentice
Joined: 29 Feb 2012 Posts: 49 Location: Sydney.AU
|
Thanks for the replies guys. I'll test it out today and let you guys know |
|
Back to top |
|
 |
|