Posted: Wed Aug 24, 2005 1:16 pm Post subject: Implementing publish/subscribe using message flows
Apprentice
Joined: 30 Jun 2005 Posts: 37
Hi,
i want to implement pub/sub concept using message flows ie by setting
MQRFH2 headers in the message flows.For this i got some information
on how to set the MQRFH2 headers for publishing and subscribing.
In the publishing message flow i am using MQINPUT node,COMPUTE node,
and PUBLICATION node.I have set the headers in COMPUTE node.
My doubt is how to send the publishing information to the broker. ie how i should code ESQL in COMPUTE node.
Hope this helps
------------------
SET OutputRoot.MQMD.Format = 'MQRFH2 ';
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR ';
SET OutputRoot.MQRFH2.(MQRFH2.Field)Encoding = InputRoot.MQMD.Encoding;
SET OutputRoot.MQRFH2.(MQRFH2.Field)CodedCharSetId = InputRoot.MQMD.CodedCharSetId;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Flags = 0;
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID =1208;
SET OutputRoot.MQRFH2.psc.Command ='Publish';
SET OutputRoot.MQRFH2.psc.Topic = '/FootBall/WCQualifier/#' ; --Put in the topic in here...U can even contruct it usign ESQL...
-- Setting mcd folder of MQRFH2 to NULL
SET OutputRoot.MQRFH2.mcd = NULL;
-- APPEND The Message Body and clear XML from the domain
SET OutputRoot."BLOB"."UnknownParserName" = ''; -- Required to clear the msg domain and MQRFH2.mcd.Msd from the temporary XML
SET OutputRoot."BLOB"."BLOB" = BITSTREAM(InputBody); -- Copy the original msg body to the OutputRoot as "BLOB" data.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum