Dave Jordan
Dave Jordan

Reputation: 11

RabbitMQ Is it possible to duplicate some messages within RabbitMQ?

I have a requirement to deliver the same message to two consumers using different routing keys. One option is to modify the code in the message creator but I hoped there may be a way to do this within RabbitMQ.

Many thanks

Upvotes: 0

Views: 1725

Answers (1)

Dat Tran
Dat Tran

Reputation: 1586

Yes, you can setup your exchange to be fanout exchange. By doing this, all queues that are bound to the exchange will receive the messages. Checkout this image so that you can understand more:

fanout exchange

You can checkout this link for fanout tutorial: https://www.rabbitmq.com/tutorials/tutorial-three-python.html

Upvotes: 1

Related Questions