Author |
Message
|
prabuinit |
Posted: Fri Nov 16, 2007 12:33 pm Post subject: BACKOUT REQEUE- Poison Message |
|
|
Newbie
Joined: 16 Nov 2007 Posts: 5
|
Hello All -
To handle poison messages, I have configured the backout threshold & requeue. QueueManager moves the poison message to my backout requeue. But the problem is, the messages are empty. Have anyone seen this before?
I don't know why this message has to get blanked.
Your help is appreciated.
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Nov 16, 2007 12:37 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Queue Managers do not perform any backout processing for you.
All messages put to a backout queue are put there by an application. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Nov 16, 2007 12:40 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
|
Back to top |
|
 |
prabuinit |
Posted: Fri Nov 16, 2007 12:46 pm Post subject: |
|
|
Newbie
Joined: 16 Nov 2007 Posts: 5
|
Thanks all.
I use JMS API. I will look into the samples. Incase if someone has any JMS code to do this backout, please let me know.
Thanks.
|
|
Back to top |
|
 |
prabuinit |
Posted: Fri Nov 16, 2007 1:06 pm Post subject: |
|
|
Newbie
Joined: 16 Nov 2007 Posts: 5
|
Hello -
This is still confusing me. I started a asynchronous JMS listener. A Java method/function is called on a message. I start a transaction whenever I receive a message. I store it in my database. I rollback the message If I'm not able to .
The scenario happened was, I was not able to store it and I rolled back repeatedly for 20 times.
I have set my MQ queues with Backout threshold as 20.
Hence message was redelievered for 20 times and then message moved to the configured backout requeue. I donot have any code that does the moving of message to the backout reqeueue.
Please throw me light on this.
Thanks.
jefflowrey wrote: |
Queue Managers do not perform any backout processing for you.
All messages put to a backout queue are put there by an application. |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 16, 2007 2:00 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
how have you ascertained that the message was empty?
How did you determine that the message wasn't empty to begin with?
JMS will put your messages to the backout queue but will not alter their content... are you sure you are throwing the proper exceptions?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
prabuinit |
Posted: Fri Nov 16, 2007 2:07 pm Post subject: |
|
|
Newbie
Joined: 16 Nov 2007 Posts: 5
|
This is what happened:
JMS Service Programs:
Queue Name: ORDER
BAck Requeue: EXCEPTION
A badly formatted message came in ORDER. ORDER queue is configured with bACKOUT thresold as 20 and Backout requeue as EXCEPTION.
After 20 retries, message moved to EXCEPTION. I ascertain this by chekcing logs that message came in for 20 times and I see CURRENT DEPTH in EXCEPTION queue as 1 through MQ explorer. But the message is empty.
Now what happens is;
Whwn I close my JMS service programs, message goes back to the source queue that is ORDER. When service is brought up again, message again went back to BACKOUT queue. I donot know what to do.
All I want is, after 20 retires, I want this message to be moved to a backout queue permanently for later support process.
Help me.
Thanks.
fjb_saper wrote: |
how have you ascertained that the message was empty?
How did you determine that the message wasn't empty to begin with?
JMS will put your messages to the backout queue but will not alter their content... are you sure you are throwing the proper exceptions?  |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 16, 2007 2:16 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Are the permissions set correctly for both base and backout queue so that your app/user can write to the backout queue?
Are you capturing any JMSExceptions and displaying the linked exception?
Are you getting an exception on the mysess.rollback() command? _________________ MQ & Broker admin |
|
Back to top |
|
 |
prabuinit |
Posted: Fri Nov 16, 2007 2:55 pm Post subject: |
|
|
Newbie
Joined: 16 Nov 2007 Posts: 5
|
OK. Got it.
MQ Queue manager moves the message to the backout requeue after delievery count equals the backout threshold. But since the message belonged to a transacted session, message could not get to backout queue permanently.
I have figured out a way, that when delievry count equals backout threshold, rollback the message and do commit, close & restart of session. Now the message with contents was permanently stored in the backout queue.
This solved the problem. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Nov 16, 2007 4:23 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
prabuinit wrote: |
MQ Queue manager moves the message to the backout requeue after delievery count equals the backout threshold. |
NO.
The App Server or the JMS Provider do this.
NOT the Queue Manager.
I realize these may look the same from where you're standing, but they aren't. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Nov 17, 2007 6:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And remember that you do have a different behavior in stand alone jms and app server jms. As well you should not do a rollback but raise the right exception... and see what happens...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|