Author |
Message
|
tingwen |
Posted: Wed Feb 04, 2009 11:36 pm Post subject: Should rollback msg be sent to my MDB right away with FIFO? |
|
|
Novice
Joined: 19 Aug 2005 Posts: 24
|
MDB using Message listener Service in WebSphere 6.1 in Linux
MQ 6.0.2.0 running in Linux
MDB is running CMP
question: when the MDB is calling ctx.setRollbackOnly() and the msg was sent back to the queue, should that message be sent back to MDB right away (assuming FIFO being selected in queue definition)? But I am not seeing that.
For example, my qlocal has msg 1, 2 and 3. After I rollback the msg 1, the MDB received msg 2 instead.
If the same question was asked already, sorry for posting it again. Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Feb 05, 2009 3:39 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You have to check the MDB's default settings and properties as defined by your appserver. There might just be one that says retry only after x seconds... and that would only apply in you are processing single threaded ?
My experience is that if you are running multiple instances the next instance will pick it up. Remember as well that the way the MDB gets the messages is by polling. So the next message within the polling interval is not the one you rejected/rolled back. You have to wait until the next poll, especially if there are enough messages waiting to process on the queue... This might take up to 5 seconds? (see the polling interval set on the qcf)
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
tom_g |
Posted: Wed Mar 04, 2009 4:19 am Post subject: |
|
|
Newbie
Joined: 04 Mar 2009 Posts: 2
|
Hi,
i'm having trouble with similar behaviour using WMQ resource adapter (v6).
When a rollback is done, it looks as if the message is placed at the end of the queue (although this is actually not the case).
e.g.: 5 msgs in Q:
Code: |
INFO: Msg: [1]
INFO: Msg: [2] -> rollback
INFO: Msg: [3] -> rollback
INFO: Msg: [4]
INFO: Msg: [5]
INFO: Msg: [2] -> rollback
INFO: Msg: [3]
INFO: Msg: [2]
|
resource adapter config:
Code: |
...
maxConnections=10
connectionConcurrency=1
...
|
activation spec config:
Code: |
...
transportType=client
maxMessages=1
maxPoolDepth=1
...
|
since FIFO is very important this is a real problem for me...
Quote: |
... This might take up to 5 seconds? (see the polling interval set on the qcf) |
How does one configure this on the inbound resource adapter? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Mar 04, 2009 2:48 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
since FIFO is very important this is a real problem for me...
|
And yet you are using an MDB and you are not stopping it for every poison message?
There is no good reason for message affinity if you can get rid of it...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
tom_g |
Posted: Fri Mar 06, 2009 1:32 am Post subject: |
|
|
Newbie
Joined: 04 Mar 2009 Posts: 2
|
fjb_saper wrote: |
And yet you are using an MDB and you are not stopping it for every poison message?
|
doh
you have a point. I was trying to understand what happened without looking at the bigger picture.
Guess i have been staring at these queue things for too long... giving me headaches...
Thank you for putting me back on the golden path... |
|
Back to top |
|
 |
|