|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Trigger message consumption |
« View previous topic :: View next topic » |
Author |
Message
|
Vin |
Posted: Fri Jul 12, 2002 2:20 pm Post subject: Trigger message consumption |
|
|
Master
Joined: 25 Mar 2002 Posts: 212 Location: India
|
We have an interesting situation here. I'm using triggering for one of our applications and was wondering about a few things. When my application gets the message after being triggered and for some reason fails to process the message retrieved from the queue, that message is essentially lost right? Is there a way that I can put the message back on the Queue if the trigerred process fails so that when my app is backit can process the message again? How can I do this using MQJMS? The platform we are using is Solaris, messages are sent from the mainframe. Any ideas? Thanks. |
|
Back to top |
|
 |
bduncan |
Posted: Fri Jul 12, 2002 3:07 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
If you do your MQGET under syncpoint, then if you application dies before committing the removal of the message from the queue, it should be rolled back automatically and be ready for processing when another application is triggered. _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Jul 12, 2002 4:48 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Be careful of poisened loops! You are tiggered on first and a message lands, starting your app. You get the message under syncpoint and then roll it back to the queue for whatever reason. As you go to close the queue, the QM realizes that you are closing a triggered on first queue with more than zero messages on it. So it generates another trigger message to the init queue. As soon as your app ends, the trigger monitor sees your app end, sees a trigger message for it on the init queue, and starts it up again. Your app picks up the same message again, rolls it back again, closes the queue again and retriggers itself again, forever and ever!
Any triggered on first apps that get their messages under syncpoint should always check the MQMD-Backoutcount count right after the GET. This is because each time you go thru that above loop, the QM ups the backout count of the message by one. If you see that this # is higher than say, 1, your app knows this message has been picked up at least twice before and may be a problem. Discard it or put it off to an exception queue and get on to the next message on the queue. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Vin |
Posted: Fri Jul 12, 2002 5:42 pm Post subject: |
|
|
Master
Joined: 25 Mar 2002 Posts: 212 Location: India
|
Appreciate all your suggestions. Questions is, is this possible with JMS? I know that JMS is not really as friendly as MQBase Java? Thanks. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Sat Jul 13, 2002 8:49 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
|
Back to top |
|
 |
Vin |
Posted: Sat Jul 13, 2002 1:38 pm Post subject: |
|
|
Master
Joined: 25 Mar 2002 Posts: 212 Location: India
|
Was wondering how to extract this value from the header? could not find any function which will let me do that on the message? any clues? Thanks |
|
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
|
|
|
|