On Tue, Nov 11, 2008 at 12:40 PM, yinghe0101 <[EMAIL PROTECTED]> wrote: > > hi, All, > first, I have a question. the setup I have is two pair of master/slave > running on different machines. > When I use activemq-admin.bat stop --jmxurl to stop one master, what happens > to the pending message in the queue on this stopped broker? > > I have a requirement that when we need to maintain the server that hosts a > broker, we want to stop one broker in a way that it first stops accepting > new messages, then it forwards its pending queue messages to the other > broker and when all the pending messages are forwarded. it will stop its > network connector. > > Is there any way to achieve the above? or I have to change the source to do > this.
Per the master/slave doc on the ActiveMQ website (http://activemq.apache.org/masterslave.html#MasterSlave-HowPureMaster/Slaveworks): 'The master broker will only respond to a client when a message exchange has been successfully passed to the slave. For example, a commit in a clients transaction will not complete until the master and the slave have processed the commit.' I also have a question for you - are the messages persistent? If so, the messages will be persisted on both the master and the slave. Just note that failback must be achieved manually as noted in the following doc: http://activemq.apache.org/masterslave.html#MasterSlave-RecoveryingaMasterSlavetopology Bruce -- perl -e 'print unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*" );' Apache ActiveMQ - http://activemq.org/ Apache Camel - http://activemq.org/camel/ Apache ServiceMix - http://servicemix.org/ Blog: http://bruceblog.org/