|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to backout group messages at once |
« View previous topic :: View next topic » |
Author |
Message
|
lodha13 |
Posted: Thu May 17, 2012 9:41 am Post subject: How to backout group messages at once |
|
|
Novice
Joined: 17 May 2012 Posts: 24
|
Hi
How can backout the group messages to backout queue at one shot.
I want to put a group of message to backout queue if any of the message in group throw some error while reading.
In a nutshell
I want to backout complete group to a backout queue when any message in the group throw some error while reading.
Thanks
Abhishek |
|
Back to top |
|
 |
Vitor |
Posted: Thu May 17, 2012 9:49 am Post subject: Re: How to backout group messages at once |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
lodha13 wrote: |
I want to put a group of message to backout queue if any of the message in group throw some error while reading. |
This would presumably by the group of messages you describe here?
lodha13 wrote: |
I want to backout complete group to a backout queue when any message in the group throw some error while reading. |
As indicated in the other thread you should ensure all the messages are in the same transaction / unit of work. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu May 17, 2012 10:06 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
There is a queue attribute (backout requeue queue name) that your app can inquire to find out where messages should be moved to if your transaction fails.
But, WMQ provides no facility for backing out messages to a backout queue. You must write the appropriate application code to do so. In concept, you would MQCMIT the message out of the queue; then MQPUT the message to whatever queue you want. This process is simple for a single message.
Your question suggests that you have a group of messages (two, twenty, 200); and if any one of these is defective, then you want to move all of them.
MQPUT and MQGET calls work with a single message. You would need to MQGET each message, store (in a DB, for example) each message that is part of the group, and MQPUT each one to the backout queue, if necessary. _________________ 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 |
|
 |
Vitor |
Posted: Thu May 17, 2012 10:20 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
bruce2359 wrote: |
You must write the appropriate application code to do so. |
Unless you're running Java code inside WAS where it's possible to have the server do it for you.
Which is not the same as WMQ doing it as my most worthy associate correctly lays out.
And is not the same as the scenario you were describing in your original thread where you were rolling messages back and forth on the original queue not the backout. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|