RabbitMQ RPC load balancing

314 Views Asked by At

Do RabbitMQ RPC (request-response) communication model support load balancing?

I have seen many examples using RPC with RabbitMQ but none of them mentioned load balancing support.

It will be great if a client will be able to send a request to a request queue (or exchange), and one of the servers will take the request, handle it and return a response to the client. Via a dedicated return queue or direct reply-to technique.

Does RabbitMQ support something like this?

1

There are 1 best solutions below

2
On

That is easily achievable by having a consumer in the request queue for each server.

Each server should have its QoS configured and avoid acknowledging the messages until they have been processed, that way the broker would only send messages to the servers that are ready.