Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-268

Queue + Transaction: ordering/redelivery

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0, 3.1
    • 4.0
    • None
    • None

    Description

      [This was posted directly to the dev@activemq.codehaus.org mailing list while JIRA was down, reposting here]

      My understanding is that Queue's are ordered, FIFO things. We have an interesting scenario here processing a message from a Queue can periodically cause an error because of local conditions. What we'd assumed is that we could get the message out of the queue using transactions, and should the error processing the message fail, rollback, wait a bit, then go again. In our current scenario it is not critical of the ordering, but this has highlighted something that may be required for a different scenario later on.

      We set this up using ActiveMQ 3.0 and also tested using the latest snapshot, but after a "failure" (rollback), messages after the failure message get delivered first, and then when it does get around to redelivering the failure message it is always the wrong message redelivered.

      we setup a test case to reproduce the scenario.

      Now, this could well highlight a vague area of the spec, or even our programming errors. All comments appreciated.

      (see attached test case, with log output you get when you run it, you will see that Message 3 is rolled back, but it redelivers message 2 instead, and only after putting Message 4 & 5 through)

      cheers,

      Paul Smith

      Attachments

        Activity

          People

            Unassigned Unassigned
            psmith@apache.org Paul Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: