activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder" <>
Subject Re: gracefully stop ActiveMQ in a network of broker
Date Tue, 11 Nov 2008 21:43:14 GMT
On Tue, Nov 11, 2008 at 2:07 PM, yinghe0101 <> wrote:
> hi Bruce,
> thanks for your info. I think I did not clearly explain my setup.
> I have masterBroker1/slaveBroker1 and masterBroker2/slaveBroker2 on
> different machines.
> Then my client( both producers and consumers) use
> failover://(tcp://masterBroker1,tcp://masterBroker2)
> I only use slaveBrokers for data replication.
> To answer you, the messages are persistent.
> The issue I have is when I need to do maintainence work on masterBroker1. I
> need to stop masterBroker1/slaveBroker1 and have masterBroker2/slaveBroker2
> still able to accept client.
> Suppose masterBroker1 have some pending messages in a queue before the
> shutdown, and I will not bring it backup again soon, i want all those
> pending messages being able to forward to masterBroker2 before masterBroker1
> stops, because those pending messages might be critical.
> In sum, i need a way to first notify masterBroker1 to stop accepting
> clients, then forward all its pending messages to the other masterBroker,
> then stop it. Is there a way to do this without modifying the code? or I
> have to change the stop in BrokerService, if I need to change the code, how
> do I know all the pending messages are forwarded?
> hope this clarify my question. I will appreciate your advice. thanks

Thanks, this definitely clarifies the situation. I assume you must
have a network of brokers defined between masterBroker1 and
masterBroker2, correct. If so, a network of brokers forwards messages
from broker-to-broker based on demand. So if there are not any
consumers on the queue on masterBroker2, the messages will not be
forwarded from masterBroker1 to masterBroker2. I don't think there's a
way to force the forwarding of messages from broker-to-broker, though
thinking about it, there are use cases for it.

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

Apache ActiveMQ -
Apache Camel -
Apache ServiceMix -


View raw message