ActiveMQ之composite destinations
来源:互联网 发布:网络尖兵是什么 编辑:程序博客网 时间:2024/05/01 19:57
项目中需要用到ActiveMQ的这个特性,在官网上找到了这篇文档,简单翻译了下,原文见:http://activemq.apache.org/composite-destinations.html
从v1.1开始,ActiveMQ就已经支持一种名为组合目标(composite destinations)的技术。这种技术可以使一个虚拟的JMS目标用来表示一个JMS目标的集合。
例如可以使用组合目标在一次操作中向12个物理队列发送消息,或者在一次操作中向一个主题(topic)和一个队列(queue)发送消息。
要实现这种功能,我们只需要在创建一个目标(destintation)时,或者在JNDI中注册目标时,用分隔符”,”来指定要组合的那些目标就可以了,例如目标
FOO.A,FOO.B,FOO.C
代表着3个不同的目标。我们可以像下面这样使用一个队列或者主题来代表它们这个集合:
// send to 3 queues as one logical operation
Queue queue = new ActiveMQQueue("FOO.A,FOO.B,FOO.C");
producer.send(queue, someMessage);
Queue queue = new ActiveMQQueue("FOO.A,FOO.B,FOO.C");
producer.send(queue, someMessage);
如果你想混合使用不同类型的目标,只需要在其前面加上前缀queue:// 或 topic://就可以了,例如:
// send to queues and topic one logical operation
Queue queue = new ActiveMQQueue("FOO.A,topic://NOTIFY.FOO.A");
producer.send(queue, someMessage);
Queue queue = new ActiveMQQueue("FOO.A,topic://NOTIFY.FOO.A");
producer.send(queue, someMessage);
- ActiveMQ之composite destinations
- ActiveMQ队列特性:组合队列(Composite Destinations)
- ActiveMQ队列特性:组合队列(Composite Destinations)
- ActiveMq 通配符(subscribing to wildcard destinations)
- ActiveMQ队列特性:配置启动队列(Configure Startup Destinations)
- ActiveMQ高级特性:虚拟Destinations实现消费者分组
- ActiveMQ队列特性:删除不活动的队列(Delete Inactive Destinations)
- ActiveMQ队列特性:删除不活动的队列(Delete Inactive Destinations)
- ActiveMQ高级特性:虚拟Destinations实现消费者分组与简单路由
- ActiveMQ队列特性:删除不活动的队列(Delete Inactive Destinations)
- ActiveMQ高级特性:虚拟Destinations实现消费者分组与简单路由 .
- ActiveMQ高级特性:虚拟Destinations实现消费者分组与简单路由
- ActiveMQ高级特性:虚拟Destinations实现消费者分组与简单路由
- 设计模式之Composite
- NHibernate之 composite-element
- 设计模式之Composite
- 设计模式之Composite
- 设计模式之 composite
- 【转】openGL中的选择机制
- 纹理贴图的干扰问题
- 一点小疑问
- 【转】如何在对话框程序中让对话框捕获WM_KEYDOWN消息
- 《VC++深入详解》笔记(一)
- ActiveMQ之composite destinations
- MFC中OpenGL旋转的问题
- 一些课后思考
- 画图板---画多边形代码
- Nehe的OpenGL框架(MFC版)
- 基于MFC的OpenGL绘图
- VC++中OpenGL的配置
- 画图板-- 中点算法画圆
- 画图板--用DDA算法和Bresenham算法画直线