2

Using WebSphere MQ I want to setup up a topic that uses queues, so that when an application or inbound cluster connection attempts to put a message to a “queue”, it actually uses a topic, and publishes it to 2 subscriptions, which are themselves 2 separate queues. In essence, I want to go from an inbound queue by name, but map it to 2 separate queues, like

AF_TO_DAAS is the inbound topic/which today is an actual cluster queue alias

=>Goes to AF_TO_APP1 and
=>Goes to AF_TO_APP2

Sort of like if these were queues on a distribution list I suppose.

Those two things are local queues.

I’m getting lost in the /topic/node business mapping it to subscriptions and model queues and what not …

4

1 に答える 1

4

WebSphere MQ では、エイリアスがキューまたはトピックを指すことができます。また、永続的なサブスクリプションを管理的に作成する手段も提供します。この設定を行うには、既存のエイリアスをトピックを指すエイリアスに置き換えて点を結びます。次に、2 つの管理サブスクリプションを使用して、パブリケーションを 2 つ (またはそれ以上) のキューにルーティングします。

* First, define the topic
DEFINE TOPIC('AF_TO_DAAS.TOPIC') +
   TOPICSTR('AF_TO_DAAS') +
   REPLACE

* Now, create an alias over the topic.
* Sending apps think this is a queue.
DEFINE QALIAS('AF_TO_DAAS') +
   TARGET('AF_TO_DAAS.TOPIC') +
   TARGTYPE(TOPIC) +
   REPLACE

* Queues for the two recvr apps
DEFINE QLOCAL('AF_TO_APP1') +
   REPLACE

DEFINE QLOCAL('AF_TO_APP2') +
   REPLACE

* Now set up adminsitrative subs to route
* messages to the two app queues.
DEFINE SUB('AF_TO_DAAS.SUB') +
   TOPICSTR('') +
   TOPICOBJ('AF_TO_DAAS.TOPIC') +
   DEST('AF_TO_APP1') +
   PSPROP(NONE) +
   REPLACE

DEFINE SUB('AF_TO_APP2.SUB') +
   TOPICSTR('') +
   TOPICOBJ('AF_TO_DAAS.TOPIC') +
   DEST('AF_TO_APP2') +
   PSPROP(NONE) +
   REPLACE

これはパブリケーションであるため、メッセージにTopはトピック文字列を含むプロパティが含まれます。PSPROP(NONE)サブスクリプション エントリの により、これが抑制されるため、メッセージは元の出版物のように見えます。

MQMD.MsgIDまた、出版物に記載されているメッセージは、元のメッセージに記載されているものとは異なることに注意してください。

于 2012-08-29T16:18:01.900 に答える