Aryan
Aryan

Reputation: 1877

ActiveMQ High Availability dynamic slave configurations

I am quite new to ActiveMQ. I am trying to have High Availability feature implemented. And all I noticed in ActiveMQ is that if I have to specify the failover url, I have to specify that in code like,

String url = "failover://(tcp://localhost:61616,tcp://localhost:62001)?randomize=false";
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url);

So it means that, If I have to add one more Slave, I need to go and change the URL here and redeploy the changes. Or Either I need to have this URL in some property file.

Is there any other alternative configuration available to pick the dynamically added Slaves automatically

Thanks In advance. :)

Upvotes: 0

Views: 964

Answers (1)

Ben ODay
Ben ODay

Reputation: 21005

if you are using a network of brokers (instead of just master/slave), there is a option called 'updateClusterClients' (new in 5.4) that does exactly this. when set to "true" it automatically updates client failover lists based on availability of brokers in the network...

see http://activemq.apache.org/failover-transport-reference.html

Upvotes: 2

Related Questions