- client must know all brokers using Failover Transport, right? Like that, failover:(tcp://broker1:61616,tcp://broker2:61616,tcp://broker3:61616)
- Is there optimization,so that the client does not have to know the existence of each broker ?
1
votes
1 Answers
1
votes
Put a TCP load balancer in front of the brokers. Only forward requests to the master broker. The LB can ping who's online or not by checking the "Slave" attribute of the broker via Jolokia/JMX.
A standalone approach would be to provide an URL to a comma separated list of broker URLs to try in case of failure. Can be done using the
updateURIsURLoption in the failover URI.There is also some possibilities to auto-discover brokers using Multicast or by querying an LDAP directory, but that requires certain infrastructure in place. Read more about it here.
Broker-side Options for Failover- Sergey Benner