[rabbitmq-discuss] .NET client with multiple hosts - connecting to one of the nodes in the cluster with failover

TrueWill baldgoth at gmail.com
Wed Oct 26 23:47:50 BST 2011


We know in advance what hosts are in our cluster (say, HostA and HostB). 
Initially our client has to try to connect to one of them (HostA, for 
instance). We'd like it to try HostA and, if that doesn't work, HostB (then 
throw an exception on failure).

RabbitMQ.Client.ConnectionFactory.CreateConnection has a protected overload 
that accepts an array of AmqpTcpEndpoint objects. Is this exposed anywhere? 
Are we supposed to descend from the standard factory?

Or is there a better way? We can certainly solve this by catching 
BrokerUnreachableException and trying the next one, but this seems like a 
problem that others must have solved.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20111026/0352f458/attachment.htm>


More information about the rabbitmq-discuss mailing list