WMQ Pub/Sub Topic to Queue bridge

只愿长相守 提交于 2020-01-04 06:16:20

问题


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:

Example in TIBCO EMS

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

How do I do this in WMQ?


回答1:


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

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.

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)


来源:https://stackoverflow.com/questions/4666467/wmq-pub-sub-topic-to-queue-bridge

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!