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.