Amio.io
Amio.io

Reputation: 21585

RabbitMq RPC vs other sync methods

Background

We have a system that consists of several microservices. For the notification events, we're using RabbitMq queues and exchanges. For sync requests, we are using HTTP/REST.

RabbitMQ RPC concern

We're would like to replace REST with RabbitMq RPC. After the initial happiness, we've checked RabbitMQ RPC implemention and it looks quite complex for a simple synchronous call.

enter image description here

Question

Is the overhead of RabbitMQ RPC okey? Do you recommend a better alternative? I like that unlike gRPC, with RabbitMQ RPC there's no need to maintain protobuf and then generate client and server libs.

Upvotes: 5

Views: 1282

Answers (1)

Saeed Taran
Saeed Taran

Reputation: 406

I know it's an old question, but it might still be useful for someone.

I've used RabbitMQ RPC for communication between microservices in .NET projects, and it's fantastic.

With a package like 'EasyNetQ', it functions like a mediator pattern: you have a request DTO, a response DTO, and a handler for the request.

You send the request DTO, the handler processes it, and you get back the response DTO.

There's no need to worry about the send/receive queues; 'EasyNetQ' handles that using the DTO namespaces.

I think GRPC would be a better choice when your microservices are developed in different programming languages.

Upvotes: 0

Related Questions