[rabbitmq-discuss] How to create connection to multiple host using RabbitMQ .net Client

Michael Klishin mklishin at gopivotal.com
Tue Jul 22 11:17:29 BST 2014

On 22 July 2014 at 11:52:24, Trần Đức Thông (humg.thongit at gmail.com) wrote:
> > I have 2 node (2 server) NodeA and NodeB rabbitmq.
> I want to switch connection to NodeA when NodeB die.
> This is like Bus in EasyNetQ
> var bus = RabbitHutch.CreateBus("host=ubuntu:5672,ubuntu:5673");  
> https://github.com/mikehadlow/EasyNetQ/wiki/Cluster-Support  

RabbitMQ clients connect to just 1 node. You need to use a proxy
and perform connection recovery (the .NET client will eventually support
automatic recovery, much like the Java client does today).

EasyNetQ maintains multiple connections under the hood for you. If that's what
you want, I recommend that you use EasyNetQ and not the bare .NET client.

Note that ensure reliable delivery in the window of time that connection is down,
you need to enqueue messages in the app, use publisher confirms and expect that
re-delivery by the client may be necessary. 

Staff Software Engineer, Pivotal/RabbitMQ

More information about the rabbitmq-discuss mailing list