On 1 April 2010 01:26, Aidan Skinner <[email protected]> wrote: > I've recently been wrestling with transaction handling in the java > broker in the context of 0-9-1 compliance. We're currently not > strictly spec compliant with 0-9-1 as we will resend messages that > have been rolled back. 0-9 and 0-8 are... ambiguous... on this matter, > and I've been trying to retain current behaviour for them. > > However, it's a) a massive PITA and b) probably Not What You Want. If > you're rolling back a consume it's almost certainly because you can't > cope with the message. > > If you think b) I'd like to float the idea of 0.8 being the "we are > breaking backwards compatibility" release so we can fix the conf file, > the command line etc. > > Thoughts?
I don't read the spec in the same way. >From the 0-9-1 Spec: 1.9.2.5. Method tx.rollback (ID 30) This method abandons all message publications and acknowledgments performed in the current transaction. A new transaction starts immediately after a rollback. Note that unacked messages will not be automatically redelivered by rollback; if that is required an explicit recover call should be issued. I read that as the unacked messages will not be automatically given back to the client. So we should put them back on the queue and let the client fight it out with other cilents to see who gets them. It is just a case that the client that does rollback will not be given a second opportunity to consume those messages. This is what we currently do in the Java broker. This differs from JMS Client Ack Recover which calls Basic.Recover which does resend all the unacked messages so the client is guarranteed to get the same messages as the first time through. So given a transacted client that consumes messages then rolls back are you suggesting that the spec says that the client should not be able to receive the messages that it had been given in the transaction it rolled back? Martin > - Aidan > -- > Apache Qpid - AMQP, JMS, other messaging love http://qpid.apache.org > "A witty saying proves nothing" - Voltaire > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:[email protected] > > -- Martin Ritchie --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
