Mass Transit with RabbitMQ Hello World
Full source code is available here.
See here for instructions on how to install Rabbit MQ.
Mass Transit is installed via nuget, its current version is 2.9.9. You also need to add the RabbitMQ.Client, but stick with version 3.4.0 or less, there was a breaking change in subsequent versions that Mass Transit has not caught up with.
In simple terms Mass Transits lets you send messages from a producer to a consumer/worker. I’m not going into any more detail, there is documentation available elsewhere.
In the sender create a bus instance and connect it to RabbitMQ -
Connect the worker to the bus -
Send the message to the bus -
And finally the consume the message -
You have to set
SimpleMassTransitRabbitMQHelloWorld.Worker as start up projects by right clicking the solution and opening properties.
That’s the basics of it, the full source code is available here.