Exchange 分发消息时根据类型的不同分发策略有区别,目前共四种类型:direct、fanout、topic、headers 。

headers 匹配 AMQP 消息的 header 而不是路由键,此外headers 交换器和direct 交换器完全一致,但性能差很多,目前几乎用不到了.