Affects Version/s: 3.0, 3.1
Fix Version/s: 4.0
[This was posted directly to the email@example.com 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)