activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: Master/Slave mode - slave never taking over
Date Wed, 05 May 2010 07:32:09 GMT
Hi Rich,

have you replicated the network connections in the master configuration into the slave configuration
? This is important.

How did you stop the master ? - did you just kill it ? (this shouldn't be problem - but might
help to identify where it is)

You could try failover://tcp://67.23.5.229:61616 - as the remoteURI for the masterConnector
in your slave - this will allow you set maxInactivityDuration (default is 30s) on the masterConnector
- e.g.
failover://(tcp://67.23.5.229:61616?wireFormat.maxInactivityDuration=10000) - to set the max
inactivity to 10 seconds 

cheers,

Rob

On 3 May 2010, at 19:54, RichStephens wrote:

> 
> We are currently using ActiveMQ 5.3.1 in a "pure Master/Slave" configuration. 
> We have one broker, set up as "producer", that receives messages from java
> and C++ clients.  This broker forwards all messages to another broker,
> called "consumer", which is set up as the master in a pure "Master/Slave"
> configuration.  We have java clients connected both the "consumer" and the
> "slave" broker to pull those messages, so we don't have a situation of the
> brokers getting "filled up", as it were.
> 
> What we are seeing is this:  The "producer" is forwarding messages to the
> "consumer" broker, and the "slave" broker is properly replicating those
> messages that its master, the "consumer" broker is receiving.  However, if
> we shut down the "master", the "slave" should finish replicating all the
> messages it got from the master "consumer" broker, and then take over to
> "become" the master.  What we are seeing is that once the last messages from
> the "consumer" broker have been replicated, the "slave" broker never
> actually takes over and begins processing messages.  The flow of messages
> from client->producer broker->slave broker just STOPS.
> 
> The configuration file on the slave broker has the following setting:
> 
> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="slave"
> dataDirectory="${activemq.base}/data"
> destroyApplicationContextOnStop="true">
>        <services>
>            <masterConnector remoteURI= "tcp://67.23.5.229:61616"
> userName="system" password="manager"/>
>       </services>
> 
> We have tried different configuration settings on the master "consumer"
> broker, like these:
> 
> <networkConnector name="producer"
> uri="static:(failover:(tcp://67.23.5.229:61616,tcp://67.23.8.252:61616)?initialReconnectDelay=100)">
> 
> <networkConnector name="producer"
> uri="static:(failover:(ssl://67.23.5.229:61616,tcp://67.23.8.252:61616)?initialReconnectDelay=1000)"
> userName="system" password="manager">
> 
> These are all 3 separate Centos Linux 5.4 instances, from a "cloud" server
> provider (rackspace.com)
> 
> The system performs as expected until the master "consumer" broker actually
> goes down and the "slave" takeover is supposed to happen.
> 
> We really need to get this working, and are so far stumped.  Any thoughts or
> ideas would be welcome.
> 
> Thanks,
> Rich Stephens 
> -- 
> View this message in context: http://old.nabble.com/Master-Slave-mode---slave-never-taking-over-tp28438843p28438843.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> 


Mime
View raw message