DEV Community

Cover image for How to connect two microservices with RabbitMQ and Rebus
Angelo Pirola
Angelo Pirola

Posted on • Edited on

How to connect two microservices with RabbitMQ and Rebus

The example in the github repository below shows a simple implementation of two microservices (.NET 8 Web Api) communicating with each other via RabbitMQ and Rebus.

GitHub Repository

Comments and/or suggestions are always welcome.

Top comments (3)

Collapse
 
stevsharp profile image
Spyros Ponaris

Could you please add some technical advantages of using Rebus?
I had a look at their site, and it seems to be somewhat similar to MassTransit.

Collapse
 
angelodotnet profile image
Angelo Pirola

Hi @stevsharp, purely personal opinion, i prefer Rebus to MassTransit for these reasons:

  • Possibility to integrate messaging services quickly.
  • In most cases I need basic features such as pub/sub, request/response, deferred message, retry.
  • It is a minimal and easily extendable framework.
  • I work on small / medium sized projects.

Although I have used MassTransit in the past, and both here and on my github profile you can find examples of use, I see it more useful in contexts where there is a need for sagas, advanced routing, integrated test harness, monitoring, scheduling, etc. or the environment is enterprise type with complex requirements and need for large-scale scalability.

If you have any other questions and/or curiosities, please answer me below, and I will try to answer you as soon as possible.

Bye

Collapse
 
stevsharp profile image
Spyros Ponaris

Ciao Angelo,
Thanks for your reply!
I’ve used MassTransit in the past and really liked it , it’s very stable and has excellent documentation.
I’ll definitely take a look at your Rebus examples on your repo.
Appreciate your quick response!