tipograf ieromonah
tipograf ieromonah

Reputation: 363

How to send messages to specialised node in a cluster rabbitmq

I have a cluster of rabbitmq servers. But the machines where the servers are hosted show differences in terms of installed software. So, they have no overlapping capabilities, they are specialized workers, for example, only one node has email software installed.

I know that a queue is bound to the node on which is created. My question is, how I can set up my queues so I can send certain messages to the special endowed node, where my special software is waiting for work, bypassing rabbitmq distributing messages round-robin algorithm.

Maybe that is not a solution, am open to any working solution

Upvotes: 0

Views: 871

Answers (2)

cantSleepNow
cantSleepNow

Reputation: 10192

You could always connect to the IP address of the specific node in the cluster, rather than connecting to some kind of a load balancer that is in front of the cluster - so specify a different IP in the client's method for opening the connection.
This of course defeats the purpose of the cluster, but it seems to me that your setup does the same thing :)

Upvotes: 1

dimm
dimm

Reputation: 100

By rabbitmq server do you mean actual rabbitmq server or clients/workers?

If I understand correctly, you can create a single exchange of type "topic". For each worker create an exclusive queue and bind it to the exchange with some unique routing key which in your case will be the feature of the host. When submitting a message to the exchange, use the feature as a routing key. The message will be routed to the appropriate host.

Upvotes: 0

Related Questions