刚在stackoverflow找到答案了
“
you can’t, the way you have things set up. RabbitMQ will round-robin the messages to the consumers, but only one consumer will receive the message from the queue. This is by design in RabbitMQ, when you have multiple consumers on a single queue.
If you need all consumers to receive all messages, then you need to change your configuration so that each consumer has it’s own queue. Then you need to publish your message through an exchange that will deliver the message to all of the queues for all of the consumers.
The easiest way to do this is with a Fanout exchange type.
”
版权声明:本文为weixin_39885683原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。