You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jlindwall <jl...@yahoo.com> on 2014/04/08 19:08:20 UTC

Failover all clients to same secondary broker

In our system message consumers come and go over time, some long-lived and
some short.  All msgs are non-persistent.

We need all clients to connect to the same broker; if that broker goes down
all clients must connect to the same secondary broker, and so on.

Is this the way to go? 
failover:(tcp://primary:61616,tcp://secondary:61617)?randomize=false 

I had hoped to use multicast so we could have brokers come and go into the
cluster (take one down for maintenance, add one for additional redundancy,
etc) without updating client connection urls.  But I do not see how I can
force all clients to switch servers in lockstep using multicast.

Thanks for any tips.




--
View this message in context: http://activemq.2283324.n4.nabble.com/Failover-all-clients-to-same-secondary-broker-tp4680171.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Failover all clients to same secondary broker

Posted by Noel OConnor <no...@gmail.com>.
You could try something like DNS failover or a software loadbalancer
presenting a VIP, but the easiest way might be to change you app to handle
connecting to multiple brokers



On Tue, Apr 29, 2014 at 11:57 AM, mchinea
<ma...@adilamtech.com.au>wrote:

> So it seems the only way to be sure clients are connected to either broker
> reliably is to have one and only one of the brokers running and if/when it
> fails, start running the broker in the second server so the clients can
> switch to it. Is this correct?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Failover-all-clients-to-same-secondary-broker-tp4680171p4680650.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Failover all clients to same secondary broker

Posted by mchinea <ma...@adilamtech.com.au>.
So it seems the only way to be sure clients are connected to either broker
reliably is to have one and only one of the brokers running and if/when it
fails, start running the broker in the second server so the clients can
switch to it. Is this correct?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Failover-all-clients-to-same-secondary-broker-tp4680171p4680650.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Failover all clients to same secondary broker

Posted by artnaseef <ar...@artnaseef.com>.
That will not be a reliable solution.  Anytime the failover transport is used
with more than one active broker, you can get clients connected to separate
brokers.  Even without randomize, consider that a loss of connection due to
a network disconnect will cause the client to reconnect to a different
broker.

Also, when the first broker goes down and then comes back up, any clients
connecting after that point will go to the first broker even though the rest
are on the second broker.





--
View this message in context: http://activemq.2283324.n4.nabble.com/Failover-all-clients-to-same-secondary-broker-tp4680171p4680187.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.