I have been running masstransit / msmq for a while now with no problems, using it to send a message from an asp.net mvc app to a windows service.
My global asax contains the following in the OnApplicationStarted event :
MessageBus = ServiceBusFactory.New(sbc =>
{
sbc.UseMsmq();
sbc.VerifyMsmqConfiguration();
sbc.UseMulticastSubscriptionClient();
sbc.ReceiveFrom("msmq://localhost/websiteQueue");
sbc.Subscribe(subs =>
{
});
});
Please note, this bus is configured to only send messages, it doesn't recieve anything. This is important.
Recently we have implemented a web garden in IIS. This is when you up the number of worker processes to more than 1. It gains you some performance by spinning up multiple copies of the site. And this is the problem.
Masstransit only allows a single instance of each queue, and ever since we've created our web garden, the messaging has stopped working intermittently. I am guessing it sometimes works because I am lucky enough to hit the instance of the site with active access to the queue.
But like I mentioned before, the queue is useless anyway, I never use it to receive anything. I was wondering if there was some way to convert this to a send only bus, where I publish messages, but never receive them?
For a short period I added a Guid.NewGuid() onto the end of the queue name, and it did start working. The only problem is it created 10 new queues every time we restart the site. This is obviously not really a permanent solution.