Well a happy new year to you all. I thought I might start the new year of with a small article on using the popular Rabbit Mq message bus.
But before I give you a link to the article this is what is the problem I was trying to solve:
At work just before XMAS, my team leaderÂ Richard King (co-authorÂ Baboon Converters) and I, were looking into providing a MSMQ queue based system where we would have multiple Queues in place and each machine in the chain could recieve and send. To keep it simple let’s forget about the duplex comms, and just consider it to be a single direction of message travel across machines. The following diagram illustrates roughly what we wanted.
Essentially what we want is some sort of routing fromÂ Machine A to Machine B.
This could all be done using pretty standard MSMQ code, and we could just forward the Queue messages programatically, or we could even use MSMQ over WCF or use the new WCF 4.0Â RoutingService. We kind of had reservations behind all of these approaches.
- MSMQ Code : Simply too much boiler plate code, sure we could abstract that, and end up with something pretty slim, but we wanted to see what we could do without going down this route
- MSMQ over WCF : Yeah ok, but lots of config required, and we need to host service somewhere. Also need to create the MSMQ queues and administer the acess rights to these queue to only authorised users.
- RoutingService : This is quite nice, but it still relies on WCF, so suffers from the same problems as MSMQ over WCF.
We just felt that all of these approaches either involved too much config/setup, or was not quite what we wanted without us writing a load of code. We also felt that this bridge must have been crossed before, so we set about trying to look at available messaging solutions out there (and there are loads), and based on some investigations we went for Rabbit Mq
Here is a link to the full article :
The article describes the solution to the problem in more detail and shows you how to configure Rabbit Mq with the Shovel plugin.