[jboss-user] [JBoss Messaging] - Re: Message is redelivered while the original transaction is

timfox do-not-reply at jboss.com
Wed Oct 29 11:35:57 EDT 2008


"szhigunov" wrote : "gaohoward" wrote :  IMO, unacknowledged messages may be sent twice. In this case after the client reconnects, first thing it should do is a transaction recovery.
  | 
  | If that is correct, what would you recommend when two clients read from the same queue? When the first dies, the second will get the message right away and the first will recover later. 

No, that's not how XA works with JMS.

If the first consumer has consumed a message and acknowledged it in an XA transaction and that transaction branch has successfully prepared, then the server fails, then on recovery the recovery manager (not part of JBM) will decide whether to commit or rollback that branch.

If the branch is rolled back the message will be redelivered, if that branch is committed it will not be redelivered.

The second one will not get the message right away.

If you're seeing something different, then, as I say, create a JIRA, attach a test case and someone will take a look.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185457#4185457

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185457



More information about the jboss-user mailing list