ActiveMq 通配符(subscribing to wildcard destinations)
来源:互联网 发布:黑暗之魂受死版pc优化 编辑:程序博客网 时间:2024/05/22 10:58
本文是参照active in action 翻译的。
activemq 支持目的地分类的概念。 我们可以根据目的地的名子将信息分类。例如你想订阅星期六下午运动的最新结果,你可以这样约定你的你的
Topics: <sport><League>.<team> 。例如: football.division.leeds。 如果leeds 参加两种运动--Scccer 和 Rugby,为了方便,我们希望通过一个消息消费者而看到Leeds两种运动的最新战绩,这个时候,通配符就有用武之地了
* : used to match one element
> : match one or all trailing elements
所以,对于上面的例子, 你可以订阅这样的主题: *.*.Leeds
如果你想知道division1 这个赛区的所有分数, 你可以订阅这个: soccer.division1.*
如果你想知道Rugby的分数: 你可以订阅这个: rugby.>.
然而, 通配符中是为消费者服务的,如果你发送了这样的一个主题: rugby.>., 这个消息仅会发送到命名了rugby.>.的主题,并不是所有的主题都是以rugby开头的。
这里有一种 方法,使消息生产者能将一条
消息发送到多个目的地。通过使用 composite destination。将同一条消息发送到不同的目的地是很有用的。 比如一个用来存储信息的应用,会发送一条消息给队列
同时也要将这条消息广播给监控的所有系统。通常,你会通过用两个producer 发送两次消息来达到这个目的。composite destination就是用来解决这种情况的
例如,如果你创建了名子为: store.order.backoffice,store.order.warehouse 的 Queue,这样 就会发送同时两个Queue。
参考自Activemq + in + action 11.2章
- ActiveMq 通配符(subscribing to wildcard destinations)
- ActiveMQ之composite destinations
- iCloud -- Subscribing to Record Changes
- struts通配符 wildcard
- Struts2.1-WildCard(通配符)
- Makefile wildcard通配符使用方法。
- Wildcard Matching 通配符匹配
- Wildcard Matching 通配符匹配
- Wildcard Matching 通配符匹配
- linux 通配符(wildcard)
- Wildcard Matching:通配符匹配
- 一、linux shell通配符(wildcard)
- LeetCode: Wildcard Matching (通配符匹配)
- Action通配符(wildcard)的配置
- 通配符匹配字符串 Wildcard Matching
- [leetcode] Wildcard Matching 通配符匹配
- [Lintcode]Wildcard Matching 通配符匹配
- EventBus:Could not dispatch event: class to subscribing class
- poj 2502 Subway dijkstra基础 !!!!入门题
- VC6编译的程序发生ESP错误
- tomcat连接数设置
- android handle
- 按钮图片表单显示不对齐
- ActiveMq 通配符(subscribing to wildcard destinations)
- 无限级分类:预排序遍历树算法与递归
- have a try...
- p6spy介绍
- 知识点(2)--系统安装启动注意事项
- 指针学习笔记
- bson
- Struts2 action之间传参
- 编写高质量代码-web前端开发修炼之道文摘