Author |
Message
|
platocons |
Posted: Mon Nov 17, 2008 4:44 am Post subject: backOutThreshold_ Non-Public member of WmqMessageConsumer |
|
|
Newbie
Joined: 17 Nov 2008 Posts: 5
|
I have developed a WMQ client using XMS to retrive messages from a remote queue using transactions. We have set up poisioned message handling on the application side and do not need any dead letter queues set up.
I have noticed however that when an application error occured and a message was rolled back 20 times, we received the following exception when Receive on the IMessageConsumer is called.
IBM.XMS.IllegalStateException: CWSMQ0011E: The attempt to Dead Letter a message failed. The dead letter queue for this Queue Manager may not exist or be invalid. Ensure a valid DeadLetterQueue is defined for the QueueManager and is available for messages to be put to.
at IBM.XMS.WMQ.WmqMessageConsumer.GetAMessage(Int64 timeOut)
at IBM.XMS.WMQ.WmqMessageConsumer.ReceiveInternal(Int64 timeout)
at IBM.XMS.WMQ.WmqMessageConsumer.Receive(Int64 delay)
My question is why am I getting this exception? I have spoken with the party who manage the queue and they have told me they have not set any threshold for rollbacks.
When I view the IMB.XMS.WMQ.WmqMessageConsumer object in the dubugger I can see that there is a Non-Public member called backOutThreshold_ which is set to 20. backoutReryQueue_ is null. Is there a way for me to change this threshold using XMS? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 17, 2008 5:00 am Post subject: Re: backOutThreshold_ Non-Public member of WmqMessageConsume |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
platocons wrote: |
We ... have set up poisioned message handling on the application side and do not need any dead letter queues set up.
|
You don't but the queue manager does. ALTER the queue manager to use the SYSTEM one, or better still define your own.
Not only will this fix the immediate problem (and someone with more XMS experience will be along in a minute to answer your specific query I'm sure) but is a best practice thing to do. Even if your application, queue manager and associated set up is perfect, a situation can easily arise where the queue manager will need to dead letter a message. The lack of a dead letter queue will prevent this, and cause various parts of the infrastructure to stop working. Some people use this as a way of detecting a problem but I find it a bit extreme.
To use an analogy - it's valid to detect that your house is on fire by watching for flames to come out of an upstairs window. The same result is better obtained by installing a smoke alarm.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 17, 2008 7:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
I have noticed however that when an application error occured and a message was rolled back 20 times, we received the following exception when Receive on the IMessageConsumer is called.
IBM.XMS.IllegalStateException: CWSMQ0011E: The attempt to Dead Letter a message failed. The dead letter queue for this Queue Manager may not exist or be invalid. Ensure a valid DeadLetterQueue is defined for the QueueManager and is available for messages to be put to.
at IBM.XMS.WMQ.WmqMessageConsumer.GetAMessage(Int64 timeOut)
at IBM.XMS.WMQ.WmqMessageConsumer.ReceiveInternal(Int64 timeout)
at IBM.XMS.WMQ.WmqMessageConsumer.Receive(Int64 delay)
|
You have a poison message.
Quote: |
We have set up poisioned message handling on the application side and do not need any dead letter queues set up. |
Really? I would have thought that you'd caught on before trying to reprocess it 20 times...
Quote: |
When I view the IMB.XMS.WMQ.WmqMessageConsumer object in the debugger I can see that there is a Non-Public member called backOutThreshold_ which is set to 20. backoutReryQueue_ is null. Is there a way for me to change this threshold using XMS? |
Yes set backout Threshold on the queue and either a backout queue or a DLQ.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
platocons |
Posted: Mon Nov 17, 2008 10:04 am Post subject: |
|
|
Newbie
Joined: 17 Nov 2008 Posts: 5
|
Thanks, but it is not a poisoned message. The application is in a state where it cannot process any messages.
My question is how can I stop the queue from getting into a bad state. Is anyone aware of a way using XMS (setting a property on the IMessageConsumer for example) to change this "backOutThreshold_" value I am seeing in the WmqMessageConsumer object? |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 17, 2008 10:23 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
platocons wrote: |
Thanks, but it is not a poisoned message. The application is in a state where it cannot process any messages.
My question is how can I stop the queue from getting into a bad state. Is anyone aware of a way using XMS (setting a property on the IMessageConsumer for example) to change this "backOutThreshold_" value I am seeing in the WmqMessageConsumer object? |
If the application is in a state where it cannot process messages why is it still attempting to do so? Once the state is detected stop the connection and stop consuming. Restart the connection after the bad state has been fixed.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 17, 2008 10:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
platocons wrote: |
The application is in a state where it cannot process any messages. |
And yet it continues to read messages off the queue - why?
platocons wrote: |
My question is how can I stop the queue from getting into a bad state. |
The queue is fine - it's the way it's being accessed which is the problem
platocons wrote: |
Is anyone aware of a way using XMS (setting a property on the IMessageConsumer for example) to change this "backOutThreshold_" value I am seeing in the WmqMessageConsumer object? |
If the application can't process messages, but can't be stopped for some reason ( ) change the queue properties to GET(DISABLED) and handle the reason code appropriately.
Or fix your application so it stops reading messages it can't process!  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Nov 17, 2008 10:51 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9471 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
The application is in a state where it cannot process any messages. |
What does this mean - exactly? What state? _________________ 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 |
|
 |
platocons |
Posted: Mon Nov 17, 2008 1:29 pm Post subject: |
|
|
Newbie
Joined: 17 Nov 2008 Posts: 5
|
Hi,
Please if you cannot answer the question, do not reply.
Is there anyone who has experience with XMS and backout queues? |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 17, 2008 1:33 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
platocons wrote: |
Hi,
Please if you cannot answer the question, do not reply.
Is there anyone who has experience with XMS and backout queues? |
fjb_saper wrote: |
Yes set backout Threshold on the queue and either a backout queue or a DLQ. |
I expect it to be the same way as in JMS.
If the backout queue is set the message should move to the boq.
If no backout queue is set the message should move to the DLQ.
Use a DLQ handler to retry later on, or some utility like MO71 to move back from boq to inputq.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Nov 17, 2008 1:40 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9471 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
Please if you cannot answer the question, do not reply. |
OK, fair enough. But if you can't provide accurate, technical explanation of what you are experiencing, we can't begin to help you. _________________ 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 |
|
 |
Vitor |
Posted: Mon Nov 17, 2008 4:40 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
platocons wrote: |
Please if you cannot answer the question, do not reply. |
We are answering the question, whilst at the same time trying to find more information about your application. Specifically the odd design where the application continues to read and roll back messages it seems to know it can't process. This is certainly not a best practice design and we need to know why you've adopted this design as you clearly have a design requirement we're unaware of.
platocons wrote: |
Is there anyone who has experience with XMS and backout queues? |
I have limited XMS, but I know JMS & backout. I'd certainly not expect the backout queue to be used in the way you are apparently using it, hence the continued questioning of how you're using it to gain an understanding of your design.
I also stand by my general comment; that it's best practice to assign a DLQ to a queue manager for a variety of reasons totally unconnected with your application or it's design. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
platocons |
Posted: Tue Nov 18, 2008 1:14 am Post subject: |
|
|
Newbie
Joined: 17 Nov 2008 Posts: 5
|
Ok sorry. I will try to ask the question in simpler terms.
Is it possible to configure the backout threshold value on the IMB.XMS.WMQ.WmqMessageConsumer object from an XMS client application? |
|
Back to top |
|
 |
Vitor |
Posted: Tue Nov 18, 2008 1:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
platocons wrote: |
Is it possible to configure the backout threshold value on the IMB.XMS.WMQ.WmqMessageConsumer object from an XMS client application? |
According to Mr Google, this value is obtained from the queue settings and is not modifiable by the application. Given the experience Mr Google & I have with XMS I'm prepared to be corrected here.
Again I point out that if you give a little detail on why you're attempting this, and more specificially the design requirement causing you to adopt this non-standard method, you stand a better chance of someone suggesting an alternative strategy. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
platocons |
Posted: Tue Nov 18, 2008 3:26 am Post subject: |
|
|
Newbie
Joined: 17 Nov 2008 Posts: 5
|
|
Back to top |
|
 |
|