Configuring transactional MSMQ on load-balanced servers

clusterload balancingmsmqwcfwindows-server-2008

I've got a solution running on a single server right now that uses transactional private queues (msmq/wcf). Windows services consume and process messages on the queues, and the web application layer pushes messages to the queues.

We're moving to an ip load-balanced configuration (round-robin, two servers, single virtual address) and there's no need to maintain message ordering between each node. So, simply replicating the stack (web app, services, queues) will be fine under normal conditions. But I'd prefer a single virtual set of queues so that no messages would be lost or delayed for extended periods if any node goes down.

I'm not new to MSMQ, but haven't configured it for multiple servers like this before. Any suggestions that don't involve reconfiguring servers? I need to stick with the load-balanced configuration.

Best Answer

You can't load balance transactional queues very easily. You need to ensure the MSMQ host receives messages that contain the IP address of the sender and not the load balancer (if you are using one). If you are load balancing with DNS then probably not a problem although MSMQ is very sticky which defeats load balancing.

Oil and water - MSMQ transactional messages and load balancing:
http://blogs.msdn.com/b/johnbreakwell/archive/2008/11/18/oil-and-water-msmq-transactional-messages-and-load-balancing.aspx

Related Topic