向所有聪明人致以问候!!
我是WebSphere Message Broker的新手,我有这样的问题..
问题
创建一个示例流以从队列接收XML消息并将其发送到目标列表..
我将通过MQ-OUTPUT将输出发送到特定队列名称,但如何将其发送到目标列表..?
答案 0 :(得分:1)
您需要将MQ输出节点设置为"目的地列表"模式使用"目的地模式"属性在节点的“高级”选项卡中。
然后,您可以设置本地环境值OutputLocalEnvironment.Destination.MQ.DestinationData[X].queueName = <queueName>
例如,查看信息中心主题http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ac16862_.htm
中给出的函数 CREATE PROCEDURE addToMQDestinationList(IN LocalEnvironment REFERENCE, IN newQueue char) BEGIN
/*******************************************************************************
* A procedure that adds a queue name to the MQ destination list in the local environment.
* This list is used by an MQOutput node that has its mode set to Destination list.
*
* IN LocalEnvironment: the LocalEnvironment to be modified.
* IN queue: the queue to be added to the list
*
*******************************************************************************/
DECLARE I INTEGER CARDINALITY(LocalEnvironment.Destination.MQ.DestinationData[]);
IF I = 0 THEN
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = newQueue;
ELSE
SET OutputLocalEnvironment.Destination.MQ.DestinationData[I+1].queueName = newQueue;
END IF;
END;