SpringBoot整合中间件RabbitMQ(二)

2019-05-06  本文已影响0人  Invi

exchange.direct

打开:http://localhost:15672/#/exchanges

1.新增Exchanges:

Name Type Features Message rate in Message rate out +/-
(AMQP default) direct D
amq.direct direct D
amq.fanout fanout D
amq.headers headers D
amq.match headers D
amq.rabbitmq.trace topic D I
amq.topic topic D
exchange.direct direct D
exchanges.fanout fanout D
exchanges.topic topic D

Durability:durable 持久化的

2.新增Queues:

Overview Messages Message rates +/-
Name Features State Ready Unacked Total incoming deliver / get ack
unionpaysmart D idle 0 0 0
unionpaysmart.news D idle 0 0 0
invi D idle 0 0 0
invi.emps D idle 0 0 0
invi.idea D idle 0 0 0
invi.news D idle 0 0 0

3.将exchange和Queues绑定。

Exchange: exchange.direct
To Routing key Arguments
unionpaysmart unionpaysmart
unionpaysmart.news unionpaysmart.news
invi invi
invi.emps invi.emps
invi.idea invi.idea
invi.news invi.news
Exchange: exchanges.fanout
To Routing key Arguments
unionpaysmart unionpaysmart
unionpaysmart.news unionpaysmart.news
invi invi
invi.emps invi.emps
invi.idea invi.idea
invi.news invi.news

Exchange: exchanges.topic

To Routing key Arguments
unionpaysmart.news *.news
invi invi.#
invi.emps invi.#
invi.idea invi.#
invi.news *.news
invi.news invi.#

”#“ 匹配 0 或者多个单词

”*“ 匹配 1个单词

4.发送/接收消息

exchange.direct 点对点
exchanges.fanout 点对所有
Exchange: exchanges.topic 按照指定格式匹配

查看并删除消息:

Queues

Get messages

Ack Mode:Ack messages requeues false

上一篇下一篇

猜你喜欢

热点阅读