activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Snyder <>
Subject Re: Race conditions
Date Sun, 08 Nov 2009 19:19:58 GMT
On Sun, Nov 8, 2009 at 6:33 AM, Wais <> wrote:
> Hi,
> I've got one machine (x) publish to activemq where there are 2 subscribers
> (y, z). y is a databse that logs all the events as they happen within this
> system, the z is a machine which acts in response to messages published by
> x.
> So, I am worried by this scenario.
> x publishes to active mq, z reacts and also publishes to activemq. This
> happens very quickly (probably < 1/5th of a millisecond). What I'm afraid
> off is that due to thread switching, the message by z may be picked up by y
> before the message by x. Does activemq guarantee the order of messages in
> this way?

If you need message ordering you can enable it using the
strictOrderDispatchPolicy for a given destination or set of

perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"

ActiveMQ in Action:

View raw message