WMQ发布/订阅主题到队列桥 [英] WMQ Pub/Sub Topic to Queue bridge

查看:97
本文介绍了WMQ发布/订阅主题到队列桥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在其他队列管理器中,可以在队列与主题之间建立桥梁,以便发布者和订阅者不需要知道他们正在使用主题:

In other queue managers it is possible to setup a bridge between a queue to a topic so that publishers and subscribers does not need to know that they are using a topic:

rel ="nofollow"> TIBCO EMS

创建网桥源=队列:QName target = topic:TName
创建桥 source = topic:TName target = queue:QName

create Bridge source=queue:QName target=topic:TName
create Bridge source=topic:TName target=queue:QName

我该如何在WMQ中执行此操作?

How do I do this in WMQ?

推荐答案

请参阅WebSphere

See WebSphere MQ V7.0 Features and Enhancements page 47, it mentions the use of Alias queues and administrative subscriptions

WebSphere MQ V7.0引入了 别名队列对象的扩展 使其可以解决 新主题对象.这对于 迁移点对点消息传递 申请发布/订阅 模型.传统的点对点 将消息放入的应用程序 WebSphere MQ可以作为 发布者,未对代码进行任何更改 利用可解析的别名队列 到主题对象.这实现了 通过定义主题在行政上 映射到适当的对象 消息所在的主题字符串 即将出版.原始的本地 队列被删除并替换为 具有相同名称的别名队列 解析为主题对象.还 注意点对点应用 从WebSphere MQ获取消息 可以作为订户运行而无需 通过定义一个 管理订阅 话题.

WebSphere MQ V7.0 introduces an extension to the alias queue object that allows it to be resolved to the new topic object. This is useful for migrating point-to-point messaging applications to the Publish/Subscribe model. A traditional point-to-point application that puts messages into WebSphere MQ can operate as a publisher without any code changes by utilizing an alias queue that resolves to a topic object. This is implemented administratively by defining a topic object that maps to an appropriate topic string on which the messages are to be published. The original local queue is deleted and replaced by an alias queue of the same name that resolves to the topic object. Also note that a point-to-point application that gets messages from WebSphere MQ can operate as a subscriber without any code changes by defining an administrative subscription to a topic.

第220页上的示例9.3显示了如何设置从主题到目标队列的管理订阅

Example 9.3 on page 220 shows how to setup a administrative subscription from a Topic to a destination queue

DEFINE SUB(SUB.RETAIL.CAT) TOPICOBJ(MATT.RETAIL.CAT) DESTCLAS(MANAGED)
DEFINE SUB(SUB.MATTRETCAT) TOPICSTR(‘matt/retail/cat’) DESTCLAS(MANAGED)
DEFINE SUB(SUB.PROVCAT) TOPICSTR(‘matt/retail/cat’) DEST(SUB.PROVCAT.DESTQ)

这篇关于WMQ发布/订阅主题到队列桥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆