Author |
Message
|
Babutian |
Posted: Wed Oct 24, 2007 5:29 am Post subject: Leave the message in the queue |
|
|
Newbie
Joined: 24 Oct 2007 Posts: 6
|
Hi there, what is the most efficient way to ensure, that a message will stay in the queue after client application recieved it, until acknoledged? Right now messages are being removed from the queue after my java client recieved them even if i don't use the acknowledge statement.
thanks! |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 24, 2007 5:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
If you mean until the client application acknowledges it's processed it correctly then you need to look at syncpoint options. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Babutian |
Posted: Wed Oct 24, 2007 6:00 am Post subject: |
|
|
Newbie
Joined: 24 Oct 2007 Posts: 6
|
to be more specific: I am using a message driven bean which is being activated every time a new message enters the queue. It is intended that the message stays in the queue until the bean executes it's acknowledge statement. I've just found how to use syncpoint in the straight client connection, but i have no idea how to configure my MDB to use those syncpoint
any help would be greatly appreciated
sorry for my poor english  |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 24, 2007 6:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Babutian wrote: |
sorry for my poor english  |
And I'm sorry about my poor Java so we're equal!
AFAIK (and that's not very far) the message is read from the queue, consumed on acknowledge and rolled back on failure. Once read, it disappears from the queue but can reappear.
A better Java person may wish to correct me. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Babutian |
Posted: Wed Oct 24, 2007 7:12 am Post subject: |
|
|
Newbie
Joined: 24 Oct 2007 Posts: 6
|
thanks for your help Vitor, I hope some java person will come up here soon |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 24, 2007 11:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
So you want a syncpoint? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Oct 24, 2007 8:47 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Babutian wrote: |
to be more specific: I am using a message driven bean which is being activated every time a new message enters the queue. It is intended that the message stays in the queue until the bean executes it's acknowledge statement. I've just found how to use syncpoint in the straight client connection, but i have no idea how to configure my MDB to use those syncpoint
any help would be greatly appreciated
sorry for my poor english  |
Check your MDB descriptor. The onMessage method of your MDB needs to be flagged for transactionality with requires New...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Babutian |
Posted: Wed Oct 24, 2007 10:59 pm Post subject: |
|
|
Newbie
Joined: 24 Oct 2007 Posts: 6
|
jefflowrey wrote: |
So you want a syncpoint? |
yes
fjb_saper wrote: |
Check your MDB descriptor. The onMessage method of your MDB needs to be flagged for transactionality with requires New... |
could you be more specific please? What part of the MDB descriptor, what section etc.
thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Oct 25, 2007 2:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Babutian wrote: |
jefflowrey wrote: |
So you want a syncpoint? |
yes
fjb_saper wrote: |
Check your MDB descriptor. The onMessage method of your MDB needs to be flagged for transactionality with requires New... |
could you be more specific please? What part of the MDB descriptor, what section etc.
thanks |
Read the WAS manual on MDB descriptor... It is a deployment attribute...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Babutian |
Posted: Thu Oct 25, 2007 10:26 pm Post subject: |
|
|
Newbie
Joined: 24 Oct 2007 Posts: 6
|
I flagged my onMessage method in the MDB descriptor as you suggested nut it hasnt brought any difference...  |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Oct 26, 2007 3:13 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Check that MQ and WAS are at compatible revision levels.
Make sure that your MDB is throwing the right exception when it can't process the message. And remember:
If not bothresh is specified your MDB will stop
If no Backout queue is specified AND MDB retry > bothresh > 0 the message goes to the DLQ
If a BO queue is specified AND MDB retry > bothresh>0 the message goes to the BO queue.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Babutian |
Posted: Fri Oct 26, 2007 3:31 am Post subject: |
|
|
Newbie
Joined: 24 Oct 2007 Posts: 6
|
does it mean, the message stays in the queue only if my MDB throws an appropriate exception? It was intended to use message.aknowledge() to let MQ Server know, that the message was processed correclty
thanks for your help btw  |
|
Back to top |
|
 |
Vitor |
Posted: Sat Oct 27, 2007 5:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Babutian wrote: |
does it mean, the message stays in the queue only if my MDB throws an appropriate exception? It was intended to use message.aknowledge() to let MQ Server know, that the message was processed correclty |
If you don't throw an error, that's pretty much what you're saying!  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|