The scenario is this:
I have a pool of MDB's, the MDB basically just calls ctx.setRollbackOnly(). This just
calls rollback after onMessage. The rollback flushes any pending acks and then calls
rollback on the server. The message is then obviously added back to the queue and
delivered again.
Heres some debug i caught:
1 adding ref 1295696329288188257 for session 10
| 2 ClientSessionImpl.acknowledge 1295696329288188257
| 3 acking 1295696329288188257 for session 10
| 4 polled ref 1295696329288188257 for session 10
| 5 adding ref 1295696329288188257 for session 21
| 6 clearing ref 1295696329288188257 for 21
| 7 adding ref 1295696329288188257 for session 15
| 8 ClientSessionImpl.acknowledge 1295696329288188257
| 9 acking 1295696329288188257 for session 15
| 10 ClientSessionImpl.acknowledge 1295696329288188257
| 11 acking 1295696329288188257 for session 21
|
|
|
You can see the message being added, the client acknowledging it and then the server
acking then the consumer polling it from deliveringRefs during the cancelRefs method.
The problem occurs between steps 5 and 6 i think. After the message has been redelivered
from session 10 it is added to session 21, in the meantime however the consumer from
session 21 is also rolling back a different message (I havent shown this debug for
clarity) and during this the message is also canceled from session 21 even tho the client
hasn't received it yet. The message is the added to session 15 and handled correctly
by it but the original client for session 21 still receives it and tries to acknowledge
it. You can see the last 4 lines showing the message being delivered twice.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213615#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...