1

While

ConnectionFactory.newConnection(Address[] addrs)

and thus

ConnectionFactory.newConnection(
  Address.parseAddresses("somehost.com:5672,otherhost.com:5672")) 

work, I was wondering if there was a way to pass multiple URIs like:

ConectionFactory.newConnection("amqps://somehost.com:5671,amqps://otherhost.com:5671")

Or to allow potentially different client certificates for each URI, first create multiple ConnectionFactories, each with one URI and then create a ConnectionFactory that takes those connection factories as inputs.

Ustaman Sangat
  • 1,505
  • 1
  • 14
  • 26

1 Answers1

0

Pretty sure this is not possible. http://www.rabbitmq.com/uri-spec.html

If you are trying to implement failover, you might consider something like heartbeat: https://wiki.archlinux.org/index.php/Simple_IP_Failover_with_Heartbeat

If you are trying to read messages from multiple places, you can use shovel (http://www.rabbitmq.com/shovel.html) to bring these messages from multiple places into one queue and read from that.

Brad Peabody
  • 10,917
  • 9
  • 44
  • 63
  • 1
    For Python(Nameko) based approach one can us [this](https://stackoverflow.com/questions/16830888/rabbitmq-client-load-balancing/48744714#48744714) – Abhijeet Feb 12 '18 at 10:55