activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mserrano <>
Subject Re: messages sometimes lost during pure master/slave failover
Date Sat, 04 Jun 2011 02:57:19 GMT
Ok... I figured out what was going on.  I will file a ticket on this shortly.  

When the master broker is undergoing a controlled shutdown, the
BrokerService.stop() method stops in this order:

* services
* connectors
* registered vm transports
* broker

So there is a period where the broker will still process sends after other
(apparently necessary) facilities have been shutdown.  I have not followed
the code paths to understand exactly what goes wrong, but I traced enough to
tell that messages sent in this interval can disappear.  So this appears to
only be an issue during a controlled shutdown.  Process death should not
cause this problem.

I'm currently working around this by having the BrokerService set a stopping
flag and having the MasterBroker check this flag and reject sends (with a
new exception class) if true.  My client code then detects this case and
just retries until the failover is complete.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message