[ https://issues.apache.org/jira/browse/QPID-2471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rajith Attapattu updated QPID-2471: ----------------------------------- Attachment: (was: QPID-2471.patch) > Java client releases messages in an unpredictable order on recover > ------------------------------------------------------------------ > > Key: QPID-2471 > URL: https://issues.apache.org/jira/browse/QPID-2471 > Project: Qpid > Issue Type: Bug > Components: Java Client > Affects Versions: 0.6 > Reporter: Rajith Attapattu > Assignee: Rajith Attapattu > Fix For: 0.7 > > > As per the JMS spec, If "recover" is called on a session, the client should > stop message delivery for that session, and restarts message delivery with > the oldest unacknowledged message. > It also says that "Redelivered messages do not have to be delivered in > exactly their original delivery order". > However it's nice to ensure ordering where possible. > Looking at the code (alteast the 0-10 codepath) it seems we are not making a > reasonable effort in ensuring we release all messages when in prefetch mode. > Quite often messages are stuck in the pre-delivery dispatch queue or the > individual consumer queues. > This results in the messages being delivered out of order. > Here the steps that would need to do to ensure recovery is done properly and > if possible to ensure ordering. > ------------------------------------------------------------------------------------------------------------------------------------------------ > 1. Flush any message acks kept in buffer. > 2. Stop the message flow. > 3. Drain the dispatch queue and the queues in each consumer > 4. Reject/release all unacked messages. > 5. Start the message flow again. > It is also nice to have a test case to ensure that ordering is maintained > under reasonable circumstances. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscr...@qpid.apache.org