Author |
Message
|
broker_new |
Posted: Sat Feb 24, 2007 4:28 pm Post subject: Using PUB SUB |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
Hi ,
1)
I have coded this commands in Publish flow
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot.MQRFH2.psc.Topic='Topic1';
SET OutputRoot.MQRFH2.psc.Command ='Publish';
END;
2)
I have coded this commands in Subscriber flow
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot.MQMD.Format = 'MQRFH2';
SET OutputRoot.MQRFH2.psc.Command = 'RegSub';
SET OutputRoot.MQRFH2.psc.Topic = InputRoot.XML.(XML.tag)Sub.Topic;
SET OutputRoot.MQRFH2.psc.QMgrName = InputRoot.XML.(XML.tag)Sub.QmgrName;
SET OutputRoot.MQRFH2.psc.QName = InputRoot.XML.(XML.tag)Sub.QName;
SET OutputRoot =InputRoot;
END;
For Subscribing the QueueManager and Queue i put the message in the input queue of Subscriber Queue as follows
<Sub><Topic>Topic1</Topic><QmgrName>BRKRQM</QmgrName><QName>SUB.TWO</QName></Sub>
I was able to subscribe the Queue to the Topic.
When iam putting the message in the Input Queue of Publish flow as
<Body><Name>India</Name></Body>
Iam getting the message in the subscribed queue but there is no data in it..
Can anyone tell me what is the exact probelm in it. _________________ IBM ->Let's build a smarter planet |
|
Back to top |
|
 |
vennela |
Posted: Sun Feb 25, 2007 5:04 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
That's because in your publish flow, you have written code to publish the message but haven't written anything for the body |
|
Back to top |
|
 |
broker_new |
Posted: Sun Feb 25, 2007 6:20 am Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
Thanks,
I have forgotten to mention
Set OutputRoot .XML = InputRoot.XML;
in the publish flow. _________________ IBM ->Let's build a smarter planet |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun Feb 25, 2007 8:18 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Please don't use the XML domain.
Please make sure that your Publication message has a properly formatted message body before you reach the Publication node. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jsware |
Posted: Sun Feb 25, 2007 2:20 pm Post subject: |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
jefflowrey wrote: |
Please don't use the XML domain. |
A truncated statement like this invites unhelpful "why not" messages. Perhaps it would be slightly more helpful to add the reason - I assume your advice would be to use the XMLNS or XMLNSC instead as the XML domain has been deprecated - however, I don't know what your actual advice would be  _________________ Regards
John
The pain of low quaility far outlasts the joy of low price. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun Feb 25, 2007 5:35 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yes, the XML domain is deprecated. It should not be used for any new development, and any significant change in an existing flow should migrate to the XMLNS or XMLNSC parser.
There's an excellent post by Steve Hanson, somewhere, about how to choose between XMLNS and XMLNSC. It mostly quotes a section from the manual, so the Info Center should likewise be as informative. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|