RabbitMQ vs NService Bus

There was a time when NService Bus surfaced and solved a lot of problems in the space of Messaging systems and Asynchronous communication. Later on when the AMQP standard became popular many Open Message Queuing platforms emerged that were based on top of AMQP standard (Many of them has the capability of supporting other Queuing protocols like MQTT and STOMP) emerged. Having worked in both the frameworks quite extensively, I will share my experiences of both and the scenarios in which we used both.

Note that this article is very basic introduction of both and does not deep dive in any of these, it just gives a basic overview of the two.

NService Bus:

As the name says its a Service Bus platform which helps make distributed systems via its messaging and workflow capabilities. It provides a lot of out of the box features to develop and maintain distributed systems. You can see all the list of features here.

Our Implementation Scenario:

In one of the projects we used NService Bus on top the MSMQ as the transport layer. The way MSMQ works is that its a decentralised messaging system, which means that each machine will have the queues setup so a producer has to access the queue on that specific machine to put the message and then a consumer will access that machine to process the messages in queuing fashion. Of course you can scale and load balance using Windows Cluster Management and many other Windows features.

Because MSMQ is decentralised, a framework is much needed to effectively communicate between the MSMQ nodes. Nservice Bus comes in to rescue and takes care of all the orchestration and communication between the nodes. NService Bus works so great that you almost forget that you have to manage MSMQ (Except that you still need to create and manage permissions and cluster management etc, but development wise NSB abstracts all the pain for you.

Rabbit MQ:

RabbitMQ is an open source messaging system which was initially developed to comply with AMQP (Advanced Message Queueing Protocol) and later developed the Plugins capability by which you can have it run on different other protocols like MQTT and STOMP. A full list of features of Rabbit MQ can be seen here.

Whats the difference between the two:

While NService Bus is a service bus platform which means its an orchestrator but underlying transport is using decentralised like MSMQ, Rabbit MQ on the other hand is a Broker base platform. Which means that its strictly a centralised platform where everything gets routed through a central broker (It does not mean its a single point of failure and that it can not scale, Rabbit MQ can scale really well and can be configured to not have a single point of failure).

NService Bus and Rabbit MQ:

Despite the fact that they seem to be quite the opponents, you can configure NSB to run on Rabbit MQ as the Transport Layer. Which means you bring all the goodness of the Rabbit MQ on table and use the powers of NSB.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.