|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
subscribe message wich is published by using MQRFH2 header |
« View previous topic :: View next topic » |
Author |
Message
|
warrior12 |
Posted: Tue Apr 10, 2012 11:06 pm Post subject: subscribe message wich is published by using MQRFH2 header |
|
|
Newbie
Joined: 10 Apr 2012 Posts: 2
|
hi there,
actually i am publishing message from one flow and then onther flow which is subscribing the message and converting into to the dilimited text format and writin in file.
============================================
in 1st flow
MQinput--- > compute----> publish.
In compute node publish logic is:
CALL CopyMessageHeaders();
SET OutputRoot.Properties.MessageSet = CONST_REMODEL_MessageSet;
--publishing to the topic as per RFH Approach for coalt
SET OutputRoot.MQMD.Format = MQFMT_RF_HEADER_2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR';
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID = 1208;
SET OutputRoot.MQRFH2.psc.Command='Publish';
SET OutputRoot.MQRFH2.psc.Topic='AAA/BBBB/CCC';
there are 2 xmlnsc message set for IP and OP.
===============================================
2)subscription flow
MQInput-->compute---> filoutput node.
In Compute node:
CREATE FUNCTION Main() RETURNS BOOLEAN -------- option 1---------
BEGIN
CALL CopyMessageHeaders();
SET OutputRoot.Properties.MessageSet='CDW_EUOM_TDS_MESSSAGE';
SET OutputRoot.Properties.MessageType='UOM';
SET OutputRoot.Properties.MessageFormat='Text1';
SET OutputLocalEnvironment.Destination.File.Name=setOPFileName(fileName,InputRoot.MQMD.MsgId);
SET OutputRoot.MRM.empCode = InputRoot.MRM.empCode;
SET OutputRoot.MRM.empName = InputRoot.MRM.empName;
PROPAGATE TO TERMINAL 'out' DELETE NONE;
PROPAGATE TO TERMINAL 'out1' DELETE NONE;
RETURN FALSE;
END;
-----------------------------
CREATE FUNCTION Main() RETURNS BOOLEAN -------- option 2---------
BEGIN
SET OutputRoot= InputRoot;
PROPAGATE TO TERMINAL 'out' DELETE NONE;
PROPAGATE TO TERMINAL 'out1' DELETE NONE;
RETURN FALSE;
END;
there are 2 MRM message set for IP(XML format) and OP (Text1 format).
case1 : if i use like 1st function then its genrating blank file.
case2 : if i use like genrateFileOP() 2nd function then its genrating blank file.
actually this is happening becuase i changed publication logic from
SET OutputRoot.Properties.Topic='AAA/BBBB/CCC';
to
SET OutputRoot.MQMD.Format = MQFMT_RF_HEADER_2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR';
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID = 1208;
SET OutputRoot.MQRFH2.psc.Command='Publish';
SET OutputRoot.MQRFH2.psc.Topic='AAA/BBBB/CCC';
i want to use option 1 becuase i am having some transformation logic and i am converting xml to Text dilimited format.
could you please suggest how i can use 1st apporch.
any help really appreciated.
Thanks. |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Apr 11, 2012 2:41 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Moved to Message Broker forum. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Apr 11, 2012 3:44 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I am struggling to understand what you are trying to do, and what you have done. You are more likely to get useful answers if you:
- format your post using [c o d e] tags. You can still correct it - just use the [edit] button
- avoid using words that we don't understand. Example : what does genrateFileOP() do?
- tell us what steps you have already taken to diagnose the problem.
Quote: |
there are 2 MRM message set for IP(XML format) |
You should not be using the MRM parser to process XML messages. Not in a new message flow, anyway. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Apr 11, 2012 4:46 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
You could also mention which version of WMB you're using. Pub/sub changed a lot in v7. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|