Wednesday, May 8, 2019

RabbitMQ and MassTransit

Messaging systems:
In the real world, applications needs to talk to each other by sending messages.
Messaging has been around for decades.

Advanced Message Queuing Protocol (AMQP) is a protocol used by software companies to interact with the other applications. It is a neutral framework which makes the communication inter-operable. This was developed by different vendors like TIBCO, Microsoft MSMQ, IBM MQ Series.


Here is a list of different AMQP products:
AMQP Key concepts:
Message Broker:
Exchanges
Queues
Bindings

RabbitMQ:

RabbitMQ is a free and complete AMQP broker implementation. It implements version 0-9-1 of the AMQP specification; this is the most widespread version today and it is the last version that focuses on the client API.

It is built upon Erlang programming technologies. Erlang comes from the telecom background and gained a good reputation in the real world for its supper efficiency and reliability.

Time to install RabbitMQ. Not going to covert this at the moment due to time constraint.
After installation, just access the administration using the URL - http://localhost:15672/ and provide the username and password as “guest”.
To connect your .NET application to RabbitMQ using AMQP is done through using .NET api library or WCF service.
RabbitMQ.Client.dll is the .NET API DLL which you need to use to connect to RabbitMQ.
Next step towards using RabbitMQ is to create an exchange and queue. This can be done either manually using RabbitMQ web interface or through dynamically by coding either using C# or Powershell.



What is MassTransit?

MassTransit is a free, open-source distributed application framework for .NET. MassTransit makes it easy to create applications and services that leverage message-based, loosely-coupled asynchronous communication for higher availability, reliability, and scalability.