Nearly correct, except that you still can't guarantee the ordering if the
messages are truly nacked, e.g. consumer or session.close();
e.g. competing consumers on the same queue messages (m1, m2)
consumer1: receive m1
consumer2: receive m2
Race
{
consumer1.close();
consumer2.rollback();
}
what does consumer2.receive() get?
If you can avoid nacking the message back to the server
then yes, you avoid *some* race conditions where the messages
get "out of order".
Since those race conditions exist, and hence the ordering
ambiguities exist, it isn't necessarily
worthwhile trying to achieve the impossible.
Don't spend 90% of your time on 10% of the problem. :-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958159#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...