How to connect two microservices with RabbitMQ and Rebus
Angelo Pirola

Angelo Pirola @angelodotnet

About: Freelance .NET Software Engineer

Location:
Varese, Italy
Joined:
Apr 27, 2023

How to connect two microservices with RabbitMQ and Rebus

Publish Date: May 26
1 3

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.

Comments 3 total

  • Spyros Ponaris
    Spyros PonarisMay 26, 2025

    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.

    • Angelo Pirola
      Angelo PirolaMay 26, 2025

      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

      • Spyros Ponaris
        Spyros PonarisMay 26, 2025

        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!

Add comment