Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » Connecting to distributed broker(Specifying multiple broker urls when connecting to a distributed broker )
Connecting to distributed broker [message #1740637] Tue, 16 August 2016 14:26 Go to next message
vicky vicky is currently offline vicky vickyFriend
Messages: 1
Registered: August 2016
Junior Member
I am using Apache Artemis as my mqtt broker. I have an Artemis cluster which is configured in Master-Slave fashion. When the Master server fails, the backup server takes over and the client has to connect to the slave server. Master and slave are having different IP.

Is there an option to specify multiple connect url (address of master and slave) while creating a MqttClient object in eclipse paho?

Something like
MqttClient cl = new MqttClient("LIST OF IPs", "Publisher", new MemoryPersistence());

instead of just
MqttClient cl = new MqttClient("tcp://localhost:1883", "Publisher", new MemoryPersistence());

such that when the connection to first address fails, a connection to the next address is tried.

Could someone please guide in this? Much appreciated.
Re: Connecting to distributed broker [message #1744281 is a reply to message #1740637] Fri, 23 September 2016 20:52 Go to previous message
Ian Craggs is currently offline Ian CraggsFriend
Messages: 83
Registered: March 2013
Member
Yes there is, at least in some of the clients - those which tick "high availability" in the matrix on this page: https://www.eclipse.org/paho/downloads.php

In the C and Java clients, this option is called "serverURIs" on the connect options. This list overrides the usual server URI.

I hope that helps.

Ian Craggs
Eclipse Paho Project Lead
Previous Topic:connectWithResult(options) infinite wait
Next Topic:Paho (java) concurrency model
Goto Forum:
  


Current Time: Sat Apr 27 03:57:15 GMT 2024

Powered by FUDForum. Page generated in 0.03101 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top