Diana
Diana

Reputation: 283

Multi producer, multi consumer in Rabbit MQ with single queue

I'm very new to RabbitMQ and I need to write a program that has Multi Producer and multi consumer with a single queue. Is this possible to do what I've shown in the image? I found lots of examples but they are all with single producer. Any producer send messages to any consumer.

enter image description here

Upvotes: 5

Views: 7906

Answers (1)

jhilden
jhilden

Reputation: 12419

In short, the answer is absolutely you can have many producers that publish to a single queue. I would recommend that you create an exchange and have your producers send things into an exchange which then forwards to a queue. In your simple diagram an exchange is not strictly necessary but it makes your solution more extensible in the future.

Upvotes: 6

Related Questions