activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <james.strac...@gmail.com>
Subject Re: message ordering from different sessions
Date Fri, 16 Dec 2005 08:20:23 GMT
On 15 Dec 2005, at 21:44, Pedro Sam wrote:
> Hi all,
>
> I know that the JMS spec says that if messages are sent from  
> different sessions, then reception ordering is undefined.  I'm just  
> wondering what the behaviour would be for ActiveMQ.
>
> For example, a single threaded app does the following:
>
> 	- create session_foo and session_bar
> 	- sends msg_foo from session_foo
> 	- sends msg_bar from session_bar
>
> Does ActiveMQ preserve the ordering of the messages in this setup?

In ActiveMQ order is preserved once the messages hit the connection  
(which has the Transport inside it). So if 1 thread sends foo then  
bar, then foo will be delivered before bar in all consumers. So order  
is preserved for each thread sending on the same connection.

Incidentally we also have support for total ordering too...
http://activemq.org/Total+Ordering

which is great if you want all of the consumers to see exactly the  
same order of messages.

James
-------
http://radio.weblogs.com/0112098/


Mime
View raw message