Author |
Message
|
dwitherspoon |
Posted: Thu Apr 29, 2004 7:11 am Post subject: Why doesn't backout processing kick in after JMS rollback? |
|
|
 Acolyte
Joined: 09 Dec 2003 Posts: 59
|
Hi all,
I've got a queue with a backout queue defined, and a BOTHRESH value of 3. I want my JMS app to be able to gracefully deal with messages it cannot recognize. So when I get one of these, I want to call rollback(). My thinking is that the message would get redelivered to me 2 more times, and then MQ should move it to the defined backout queue.
In my testing, my unrecognized message got redelivered to me 27 times and was never moved to the backout queue.
Am I understanding this feature correctly? Is there some other setting that controls this? I have seen message MsgRetryCount as an attribute of the channel, but nothing for a queue. _________________ Good...Fast...Cheap. Choose any two. |
|
Back to top |
|
 |
techno |
Posted: Thu Apr 29, 2004 7:38 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
No truly.
Moving to backout queue is not done automatically. Your application needs to do. Application always has to check if backout count reached threshold. Depending on the condition, you may send the message. I did the samething in my app.
The only advantage you get is: Maintaining boqueue and threshold in the queue.
Others, Am I right in this approach?
Thanks |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Apr 29, 2004 7:42 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
If you want a message moved to the backout queue, then you need to do it. The base MQ product doesn't automatically move messages to the backout queue.
However, some of the non-base MQ products will. The WMQI/WBI broker products will move messages to the backout queues. You'll also get messages moved to the backout queue when you use MDBs from inside of WAS (doesn't matter if it is full MQ or embedded JMS).
There are some samples at:
http://www.developer.ibm.com/tech/sampmq.html
Look for backout. I believe there are C and Java versions. |
|
Back to top |
|
 |
dwitherspoon |
Posted: Thu Apr 29, 2004 10:20 am Post subject: |
|
|
 Acolyte
Joined: 09 Dec 2003 Posts: 59
|
OOOoooohhh.
Can I do this from a JMS application, or must I use MQ base classes to do it? _________________ Good...Fast...Cheap. Choose any two. |
|
Back to top |
|
 |
techno |
Posted: Thu Apr 29, 2004 9:41 pm Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
I guess, you need to write inquiry(boququem threshold) program using mq base. |
|
Back to top |
|
 |
dwitherspoon |
Posted: Fri Apr 30, 2004 3:55 am Post subject: |
|
|
 Acolyte
Joined: 09 Dec 2003 Posts: 59
|
OK. Thanks.
Too back JMS doesn't provide an API to discharge/park/reject a message, and then let the provider do the right thing - whatever that might be.
I did manage to cobble something together in JMS to basically just resend the message to a backout queue, but it does lose some of the original information...such as message id, put date/time. But it's better than nothing. _________________ Good...Fast...Cheap. Choose any two. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Apr 30, 2004 4:15 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You should look at Chapter 13 of the Using Java manual. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|