Author |
Message
|
kavya0105 |
Posted: Tue Sep 17, 2013 2:49 am Post subject: Handling Exceptions When output queue is full |
|
|
Newbie
Joined: 13 Jun 2013 Posts: 7
|
Hi all,
I need some clarification regarding MQ. The scenrio is when the MQOutput is reaches the maximum depth and fails with queue is full.In that scenerio i need to pass the original message back to the input queue. The message should not be discarded. Is there any way to do this? |
|
Back to top |
|
 |
exerk |
Posted: Tue Sep 17, 2013 2:52 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Moving this to a more appropriate forum. kavya0105, please take more care where you post next time, thank you.
In answer to your question, there's nothing to pass back - the 'message' will never have been in WMQ and it's an application responsibility to deal with the buffer content. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
Andyh |
Posted: Tue Sep 17, 2013 4:34 am Post subject: |
|
|
Master
Joined: 29 Jul 2010 Posts: 239
|
Assuming this is an application that consumes a message from an input queue and responds with a message to an output queue, then placing these actions in a unit of work (MQGMO_SYNCPOINT, MQPMO_SYNCPOINT, MQCMIT/MQBACK) will allow you to undo the MQGET in the case where the MQPUT fails. |
|
Back to top |
|
 |
exerk |
Posted: Tue Sep 17, 2013 4:53 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Andyh wrote: |
Assuming this is an application that consumes a message from an input queue and responds with a message to an output queue... |
Good spot - yet another one of my doh! days  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Sep 17, 2013 4:54 am Post subject: Re: Handling Exceptions When output queue is full |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kavya0105 wrote: |
The message should not be discarded. Is there any way to do this? |
Catch the failure of the MQOutput node, determine that it's a queue full error and write logic to return the message as you describe.
Simple. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Tibor |
Posted: Tue Sep 17, 2013 6:38 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
In the simplest scenario: set the Backout Queue and Backout Threshold on your input queue, so the failing messages will be automatically arriving into your backout queue. But as Vitor wrote, there are more options... |
|
Back to top |
|
 |
exerk |
Posted: Tue Sep 17, 2013 7:06 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Tibor wrote: |
...so the failing messages will be automatically arriving into your backout queue... |
I dispute that - the application still requires logic to put the message to the BOQ, WMQ will not do it for you. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
Tibor |
Posted: Tue Sep 17, 2013 7:18 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
You are right, this is not the WMB forum.  |
|
Back to top |
|
 |
Vitor |
Posted: Tue Sep 17, 2013 7:19 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
exerk wrote: |
Tibor wrote: |
...so the failing messages will be automatically arriving into your backout queue... |
I dispute that - the application still requires logic to put the message to the BOQ, WMQ will not do it for you. |
My working assumption, given that the OP refers to the MQOutput failing because the queue is full and not that the MQPut fails because the queue is full, is that the OP is using WMB and this most certainly will put messages on the backout queue for you.
The same is true of an app running under WAS. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
exerk |
Posted: Tue Sep 17, 2013 7:21 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Vitor wrote: |
exerk wrote: |
Tibor wrote: |
...so the failing messages will be automatically arriving into your backout queue... |
I dispute that - the application still requires logic to put the message to the BOQ, WMQ will not do it for you. |
My working assumption, given that the OP refers to the MQOutput failing because the queue is full and not that the MQPut fails because the queue is full, is that the OP is using WMB and this most certainly will put messages on the backout queue for you.
The same is true of an app running under WAS. |
Which is why I don't have WAS or WMB/IB on my CV - I have enough trouble convincing people I know what I'm talking about just with WMQ  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
|