Coombs, Lawrence
2013-10-03 02:16:18 UTC
I have a P2P application and now I want the messages to go to two queues. Therefore, I created an alias, a topic and two subscriptions.
Here are the object definitions:
1. Define an alias queue of type TOPIC.
def qalias('NQSX.IAS.INVENTORY.QA01') +
TARGET('NQSXRTIINV') +
DEFBIND(NOTFIXED) +
TARGTYPE(TOPIC) replace
2. Next define a topic for each ALIAS with the same name as the TARGET
def TOPIC('NQSXRTIINV') +
TOPICSTR('NQSXRTIINV') replace
3. Define a subscription for each recipient
def SUB(NQSXRTIINV1) TOPICSTR('NQSXRTIINV') +
DEST('NQSX.IAS.INVENTORY.QC02') replace
def SUB(NQSXRTIINV2) TOPICSTR('NQSXRTIINV') +
DEST('NQSX.IAS.INVENTORY.QC01') replace
The destination queues in the subscription definitions are cluster queues that exist on two queue managers.
Test #1
* I deleted this subscription so that there is only one destination receiving messages ('NQSX.IAS.INVENTORY.QC01')
def SUB(NQSXRTIINV1) TOPICSTR('NQSXRTIINV') DEST('NQSX.IAS.INVENTORY.QC02') replace
* I used amqsput to send 13 messages to the qalias NQSX.IAS.INVENTORY.QA01.
* The result was what I expected - 7 messages went to one queue manager while 6 messages went to the other queue manager.
Test #2
* I re-defined the def SUB(NQSXRTIINV1) TOPICSTR('NQSXRTIINV') +
DEST('NQSX.IAS.INVENTORY.QC02') replace
* Now there are two subscriptions to the same topic.
* I used the same amqsput to send 13 messages to the same qalia as I did in test 1.
* The result was not what I expected. 13 messages went to one queue manager for the QC01 queue and 13 messages went to the QC02 queue on the other queue manager.
Is this the way this techniques is supposed to work? I want the messages to be distributed almost equally on both queue managers for both queues.
Note: The cluster queues are defined with DEFBIND(NOTFIXED).
This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.
To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Here are the object definitions:
1. Define an alias queue of type TOPIC.
def qalias('NQSX.IAS.INVENTORY.QA01') +
TARGET('NQSXRTIINV') +
DEFBIND(NOTFIXED) +
TARGTYPE(TOPIC) replace
2. Next define a topic for each ALIAS with the same name as the TARGET
def TOPIC('NQSXRTIINV') +
TOPICSTR('NQSXRTIINV') replace
3. Define a subscription for each recipient
def SUB(NQSXRTIINV1) TOPICSTR('NQSXRTIINV') +
DEST('NQSX.IAS.INVENTORY.QC02') replace
def SUB(NQSXRTIINV2) TOPICSTR('NQSXRTIINV') +
DEST('NQSX.IAS.INVENTORY.QC01') replace
The destination queues in the subscription definitions are cluster queues that exist on two queue managers.
Test #1
* I deleted this subscription so that there is only one destination receiving messages ('NQSX.IAS.INVENTORY.QC01')
def SUB(NQSXRTIINV1) TOPICSTR('NQSXRTIINV') DEST('NQSX.IAS.INVENTORY.QC02') replace
* I used amqsput to send 13 messages to the qalias NQSX.IAS.INVENTORY.QA01.
* The result was what I expected - 7 messages went to one queue manager while 6 messages went to the other queue manager.
Test #2
* I re-defined the def SUB(NQSXRTIINV1) TOPICSTR('NQSXRTIINV') +
DEST('NQSX.IAS.INVENTORY.QC02') replace
* Now there are two subscriptions to the same topic.
* I used the same amqsput to send 13 messages to the same qalia as I did in test 1.
* The result was not what I expected. 13 messages went to one queue manager for the QC01 queue and 13 messages went to the QC02 queue on the other queue manager.
Is this the way this techniques is supposed to work? I want the messages to be distributed almost equally on both queue managers for both queues.
Note: The cluster queues are defined with DEFBIND(NOTFIXED).
This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.
To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html