|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Poison message |
« View previous topic :: View next topic » |
Author |
Message
|
WBI_user |
Posted: Mon Oct 06, 2003 2:51 pm Post subject: Poison message |
|
|
Partisan
Joined: 07 Aug 2001 Posts: 386
|
According to the MQ using Java manual. If ConnectionConsumer is used, the message that exceed the backout threshold will automatically be re-queued to the back out queuespecified.
My understanding is ConnectionConsumer is an App Server function (ASF). If my JMS program is not using ASf and it uses the onMessage method to pass message to the application. How can poison message be handled ? |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Oct 07, 2003 11:15 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I haven't tried it myself, but I would guess that you would throw an exception in your onMessage to get the message put back on the queue. It would then get redelivered to you. You'd need to keep an eye on the redelivery count and then eventually issue a send to move the message to another queue.
The gotchas will be that because you are using JMS, you don't have access to either the backout count or backout queue name so that you 'll know when to move the poison message..... |
|
Back to top |
|
 |
sc |
Posted: Wed Oct 08, 2003 8:03 pm Post subject: |
|
|
Novice
Joined: 06 Sep 2003 Posts: 16
|
Actually you could use Message.getLongProperty("JMSXDeliveryCount") to find the backout count for specified message. Use another property name to find the value of backout queue name. |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Oct 09, 2003 9:06 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Oops...I meant JMS doesn't have access to the queue's backout threshold (not backout count). Sorry about that. |
|
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
|
|
|
|