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

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.

主站蜘蛛池模板: 丹寨县| 西藏| 互助| 东安县| 平乐县| 桃园县| 平陆县| 灵川县| 宜宾市| 辉县市| 凯里市| 南岸区| 武邑县| 金川县| 永吉县| 宁陕县| 交口县| 多伦县| 潍坊市| 新河县| 故城县| 涟源市| 安康市| 固安县| 汾西县| 镇康县| 云林县| 乌拉特中旗| 鹤岗市| 崇信县| 临西县| 右玉县| 镇平县| 炉霍县| 静宁县| 繁峙县| 大足县| 遵义市| 砚山县| 莆田市| 田东县|