[rabbitmq-discuss] Extending the java rabbitmq client
Michael Klishin
mklishin at gopivotal.com
Thu Apr 3 13:20:58 BST 2014
On 3 April 2014 at 16:17:49, Hans-Joachim Kliemeck (klk at mmw.ag) wrote:
> > I've discovered that there is already a possibility to auto-reconnect
> the client ("automaticRecovery") but i want to make advantage
> of the
> multiple addresses capability on newConnection. Attached
> a patch for the
> change.
If you use ConnectionFactory#newConnection with an array of addresses,
they will be shuffled before every connection attempt:
http://hg.rabbitmq.com/rabbitmq-java-client/file/53441f4809ac/src/com/rabbitmq/client/impl/recovery/RecoveryAwareAMQConnectionFactory.java#l32
--
MK
Software Engineer, Pivotal/RabbitMQ
More information about the rabbitmq-discuss
mailing list