You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by paddycarman <pa...@gmail.com> on 2014/05/14 22:12:28 UTC

Connecting to Master/Slave from client libs (MQTT, STOMP etc.) and failover

Hi All,     
 In a Master/Slave setup AFAIK, the individual brokers have different IP
addresses. Let's say that a device would like to connect to a  Master/Slave
setup using a client lib (say MQTT). How do we do failover in this case? As
far as I understand, the failover protocol is only for JMS connections.

* Should the client know the IP addresses of both the Master and Slave and
handle connection failures on its own by connecting to the slave if the
master fails?

* Is there a way to advertise a single IP address for the Master/Slave setup
and hide the details of the setup from the client?

Thanks in advance.
Paddy



--
View this message in context: http://activemq.2283324.n4.nabble.com/Connecting-to-Master-Slave-from-client-libs-MQTT-STOMP-etc-and-failover-tp4681129.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Connecting to Master/Slave from client libs (MQTT, STOMP etc.) and failover

Posted by Hiram Chirino <hi...@hiramchirino.com>.
On Wed, May 14, 2014 at 4:12 PM, paddycarman <pa...@gmail.com> wrote:
> Hi All,
>  In a Master/Slave setup AFAIK, the individual brokers have different IP
> addresses. Let's say that a device would like to connect to a  Master/Slave
> setup using a client lib (say MQTT). How do we do failover in this case? As
> far as I understand, the failover protocol is only for JMS connections.
>

Correct.  Failover is mostly a function of the client lib.

> * Should the client know the IP addresses of both the Master and Slave and
> handle connection failures on its own by connecting to the slave if the
> master fails?
>

Yes.

> * Is there a way to advertise a single IP address for the Master/Slave setup
> and hide the details of the setup from the client?


Yes.  Use TCP load balancer in front of the master/slave pairs.
Something like HAProxy should work.

>
> Thanks in advance.
> Paddy
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Connecting-to-Master-Slave-from-client-libs-MQTT-STOMP-etc-and-failover-tp4681129.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Hiram Chirino
Engineering | Red Hat, Inc.
hchirino@redhat.com | fusesource.com | redhat.com
skype: hiramchirino | twitter: @hiramchirino