Bright Leopold

i come from the other world,i will go back after the love,the regret,the alive and the dead are over

导航

2017年12月21日

rabbitmq (四) 路由

摘要: 上文讲的是广播类型fanout 本章讲 direct和topic. 当使用广播类型fanout的时候: routingKey字段不起作用. direct:精确匹配 routingKey:匹配一个单词,消费者根据单词找到队列 topic:通过正则匹配.'*'匹配一个单词.'#'匹配多个单词 routi 阅读全文

posted @ 2017-12-21 15:23 Bright Leopold 阅读(96) 评论(0) 推荐(0)

rabbitmq (三) 发布/订阅

摘要: rabbitmq的目的并不是让生产者把消息直接发到队列里面去, 这样不能实现解耦的目的,也不利于程序的扩展. 所以就有交换机(exchanges)的概念. 交换机有几种类型:direct, topic, headers 和fanout, 可以为交换机命名,还有一种没有命名的交换机,上几章的消息都是发 阅读全文

posted @ 2017-12-21 11:43 Bright Leopold 阅读(95) 评论(0) 推荐(0)