0

I currently have a pool of machines that produce widgets, and I am using RabbitMQ to route jobs to each machine based on a routing key using a topic exchange. For example, I can produce a message onto an exchange with a routing key of "workstation.machine.1" and machine 1 will consume this job, ack the message when complete, and move onto the next one.

What I want to do is also have a queue of messages that are not machine-dependent, meaning a machine can pull from a separate queue if there are no messages on its machine-specific queue.

I think what I need to do is get my consumer from multiple queues using the same consumer. Binding to multiple routing keys is not the solution; if I have a routing key of "workstation.machine" as a generic binding, all the machines will receive the message, not just one.

I am using Node and Amqplib to set up my queues and bindings.

It could be that I am approaching the problem incorrectly.

Manik Kumar
  • 764
  • 7
  • 17
Simon Bowen
  • 31
  • 1
  • 3

0 Answers0