单mq而言的话你的fanout的确就支持,其实其他两种也支持,只需要在exchange上配下而已。
但这个东西建议是消费者也要做好防备,避免生产者重复投递消息,甚至包括消费者在消费消息时未ack掉消息的后续处理也需要注意。
感谢您的回答
刚在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.
”
我感觉只会被消费一次啊.他是轮流分发的.一条只给一个订阅者.
不过应该是可以配置的.
是的,轮流分发
work模式