fanout交换器是交换器的一种类型我们来看下官网的剖析
The core idea in the messaging model in RabbitMQ is that the producer never sends any messages directly to a queue. Actually, quite often the producer doesn't even know if a message will be delivered to any queue at all.
Instead, the producer can only send messages to an _exchange_. An exchange is a very simple thing. On one side it receives messages from producers and the other side it pushes them to queues. The exchange must know exactly what to do with a message it receives. Should it be appended to a particular queue? Should it be appended to many queues? Or should it get discarded. The rules for that are defined by the _exchange type_.
我们对以上举行翻译
RabbitMQ 消息传递模型的焦点头脑是,生产者从不直接将任何消息发送到队列。实际上,生产者经常甚至不知道消息是否会被投递到哪个队列。
相反,生产者只能将消息发送到一个交换器。交换器是一种非常简单的组件。它一端吸收来自生产者的消息,另一端将消息推送到队列。交换器必须确切知道如何处置惩罚吸收到的消息。是将消息附加到特定的某个队列?照旧附加到多个队列?亦或是将其抛弃。这些规则由交换器类型来定义。
这里的意思就是在最开始我们的消息传递时生产者直接将消息发送给队列现在变成了生产者将消息发给交换器由交换器将其发送给不同的队列(以fanout为例)