官术网_书友最值得收藏!

Fanout exchange

The fanout copies and routes a received message to all queues that are bound to it regardless of routing keys or pattern matching, as with direct and topic exchanges. Keys provided will simply be ignored.

Fanout exchanges can be useful when the same message needs to be sent to one or more queues with consumers who may process the same message in different ways.

The fanout copies and routes a received message to all queues that are bound to it regardless of routing keys or pattern matching as with direct and topic exchanges. Keys provided will simply be ignored.

Fanout exchanges can be useful when the same message needs to be sent to one or more queues with consumers who may process the same message in different ways.

The following fanout exchange figure shows an example where a message received by the exchange is copied and routed to all three queues that are bound to the exchange. It could be sport or weather news updates that should be sent out to each connected mobile device when something happens.

The default exchange AMQP brokers must provide for the topic exchange is amq.fanout:

Received messages are routed to all queues that are bound to the exchange.

SCENARIO 1:

  • Exchange: sport news
  • Queue A: Mobile client Queue A
  • Binding: Binging between the exchange (sport news) and Queue A (mobile client Queue A)

EXAMPLE:

A message is sent to the exchange sport news. The message is routed to all queues (Queue A, Queue B, and Queue C) because all queues are bound to the exchange. Provided routing keys are ignored.

主站蜘蛛池模板: 松原市| 昔阳县| 孝义市| 仁化县| 子长县| 外汇| 镶黄旗| 福州市| 北宁市| 尼勒克县| 柯坪县| 达州市| 仙桃市| 奉贤区| 大厂| 日照市| 漠河县| 玛多县| 南部县| 邢台县| 九龙县| 抚顺市| 彭州市| 潞西市| 桦甸市| 洛阳市| 达孜县| 芮城县| 曲阜市| 车致| 邢台市| 教育| 棋牌| 攀枝花市| 石河子市| 丰镇市| 成安县| 岑巩县| 信宜市| 莱西市| 北安市|