Question

We have configured an active/active cluster of RabbitMQ's in our test environment.

We connect using MassTransit specifying ReceiveFrom("rabbitmq://cluster_machine_a/some_queue?ha=true").

Obviously, this is utilizing a specific cluster node and thus provides no failover.

What is the correct method of informing MassTransit about cluster node(s) so that failover occurs?

RabbitMQ documentation indicates that clients should use a traditional load-balancer to farm the traffic, however will this work with RabbitMQ? (last section - http://www.rabbitmq.com/clustering.html)

Was it helpful?

Solution

To answer my own question, there isn't a concept of failover a-la SQL server connection strings with Failover Partner in MassTransit.

Instead you just introduce a load balancer infront of the RMQ's and accept that you will receive errors when a node goes down which you code recovery for. Of course you need to connect the RMQ nodes together which can be achieved with it's inbuilt clustering.

Finally, receive from the virtual ip introduced by the load balancer and let it take care of detecting failed RMQ nodes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top