Author |
Message
|
jeevan |
Posted: Wed Dec 23, 2009 9:50 am Post subject: How MQ handles poison messages as JMS provider? |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
It may sound like an WAS issue, but my question is about poison message handling when MQ is jms provider.
I know we have had many discussions in this forum. Also, I know still many developer belive that MQ mooe the message out fo the queue when the backoout count in the message reaches to BOTHRESH of the qieie. However, not being a developer, I do not keep track of any changes in client software regarding this. I never know MQ ever move message out of a queue but when I read this article I am confused.
When WebSphere MQ is the JMS provider
By default, queues created with WebSphere MQ have the Backout threshold property (known in WebSphere MQ terms as BOTHRESH) set to 0. Therefore, the default behaviour of WebSphere MQ is never to back out poison messages. What does this mean?
When a poison message is rolled back by an MDB, it is returned to the queue from which it originated. As the queue has no Backout threshold defined, the poison message will be left there. However, as it is now on the queue, it will be detected by the message listener service and redelivered to the MDB. But this is a poison message, so the MDB will reject the message, causing it to be rolled back and returned to the queue!
This sequence of events will continue until the number of times the poison message has been rolled back equals the value of the listener port's Maximum retries property. At this time, the listener port will shut itself down. The way to prevent this is from happening is to set the Backout threshold property on the queue to a value greater than 0 and less than the value of the listener port's Maximum retries property. This will ensure that any poison message is backed out and removed from the queue before the listener port shuts down.
What does the first para try to convey? specially this sentence-->>>Therefore, the default behaviour of WebSphere MQ is never to back out poison messages.
Does MQ backout a message ever? is not the BOTHRESH setup for applicaiton to see when to move the message?
I agree that the embeded jms server in WAS may behave differently but MQ does not move the message in my understanding.
I would really appreciate your comments.
FYI, the above text is taken from this article
http://www.ibm.com/developerworks/websphere/library/techarticles/0405_titheridge/0405_titheridge.html |
|
Back to top |
|
 |
Vitor |
Posted: Wed Dec 23, 2009 11:05 am Post subject: Re: How MQ handles poison messages as JMS provider? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
jeevan wrote: |
Does MQ backout a message ever? |
jeevan wrote: |
is not the BOTHRESH setup for applicaiton to see when to move the message? |
Yes - for the application to see when to move the message. Not MQ. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Dec 23, 2009 11:47 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The JMS Provider will honor the backout threshold. MQ itself won't. |
|
Back to top |
|
 |
jeevan |
Posted: Wed Dec 23, 2009 12:07 pm Post subject: |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
mqjeff wrote: |
The JMS Provider will honor the backout threshold. MQ itself won't. |
Are you saying that a jms provider will move the message? I am reresearchign it again because my friend said, he read somewhere that the message are moved by jms provider. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Dec 23, 2009 12:22 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Yes, the MQ JMS Provider will honor the BOTHRESH on the queue and put a message that has been backed out that many times to the BOQUEUE.
That's exactly what that article you quoted says. Nowhere does it say "MQ" does anything. It says "The MDB Listener" and "the listener port". These are JMS objects, not MQ objects.
The JMS provider is an MQ Application, not a part of MQ. |
|
Back to top |
|
 |
jeevan |
Posted: Wed Dec 23, 2009 12:43 pm Post subject: |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
mqjeff wrote: |
Yes, the MQ JMS Provider will honor the BOTHRESH on the queue and put a message that has been backed out that many times to the BOQUEUE.
That's exactly what that article you quoted says. Nowhere does it say "MQ" does anything. It says "The MDB Listener" and "the listener port". These are JMS objects, not MQ objects.
The JMS provider is an MQ Application, not a part of MQ. |
Interesting. I think MQ is jms provider( or jms server) and a jms application is a jms consumer or a jms client.
I am not much worreid aobut these jargon, I want to be confirm that my understanding ( mq does not move message) hold true.
thanks a lot |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Dec 23, 2009 12:48 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
jeevan wrote: |
Interesting. I think MQ is jms provider( or jms server) and a jms application is a jms consumer or a jms client. |
There is some room for debate here. But the JMS provider code is not a queue manager owned process, nor is it running inside a queue manager owned process - it's running inside the JEE container. |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Dec 23, 2009 1:28 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
I want to be confirm that my understanding ( mq does not move message) hold true. |
MQ does not move messages. It is up to the MQ application (not jms), to look at the backout count, compare it to the backout threshold, then move the message to the backout requeue queue name. _________________ 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 |
|
 |
|