Author |
Message
|
chris boehnke |
Posted: Tue Jun 26, 2007 12:50 pm Post subject: When do we use MQRFH2 header? |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi all,
my flow looks lik ethis:
input - aggregate control - compute - output.....request message flow
response from request - aggregate reply - compute - source application....reply message flow.
we are processing a Cobol xml in the request message and converting to IAA XML.
in the reply message, the IAA xml is converting to Cobol xml by using style sheets.
Do I need to use the MQRFH2 header??
thanks. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jun 26, 2007 7:04 pm Post subject: Re: When do we use MQRFH2 header? |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
chris boehnke wrote: |
Do I need to use the MQRFH2 header??
thanks. |
Absolutely not. You are not doing pub/sub.
Pub/sub will require you to use an RFH2 hdr...
The question for p2p is really do I want to use an RFH2? It depends on the targetClient ... is it MQ or JMS? Do you need to describe message characteristics outside of the payload??
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
chris boehnke |
Posted: Wed Jun 27, 2007 4:58 am Post subject: Re: When do we use MQRFH2 header? |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
fjb_saper wrote: |
chris boehnke wrote: |
Do I need to use the MQRFH2 header??
thanks. |
Absolutely not. You are not doing pub/sub.
Pub/sub will require you to use an RFH2 hdr...
The question for p2p is really do I want to use an RFH2? It depends on the targetClient ... is it MQ or JMS? Do you need to describe message characteristics outside of the payload??
Enjoy  |
Earlier I was using the http request node and sending the message to web servies in the request message flow by adding the JMS header.
The JMS header information what I was adding is here:
CREATE COMPUTE MODULE GeocodeODSServiceFanOut_AddJMSHeaders
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
-- CALL CopyMessageHeaders();
CALL CopyEntireMessage();
-- If there is no RFH2 header, add one
IF CARDINALITY(OutputRoot.MQRFH2.*[]) = 0 THEN
CREATE NEXTSIBLING OF OutputRoot.MQMD DOMAIN 'MQRFH2';
END IF;
-- Set MQRFH2 struct fields
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR ';
-- Set the JMS destination and reply fields
SET OutputRoot.MQRFH2.jms.Dst = 'queue:///ESB.SVC.REQUEST';
SET OutputRoot.MQRFH2.jms.Rto = 'queue:///ESB.SVC.REPLY';
SET OutputRoot.MQRFH2.mcd.Msd = 'jms_text';
-- Set MQRFH2 User attributes
SET OutputRoot.MQRFH2.usr = NULL;
RETURN TRUE;
END;
Now I am NOT using the destination as the web services and I am sending the message to output queue. The destination application picks it up and places the reply message on the reply message flow's input queue.
In this case, do I need to delete the whole JMS header(the code what I mentioned above) or part of it?
Please suggest.
Thanks. |
|
Back to top |
|
 |
mrgate |
Posted: Wed Jun 27, 2007 5:12 am Post subject: Re: When do we use MQRFH2 header? |
|
|
 Centurion
Joined: 28 Feb 2007 Posts: 141 Location: India
|
chris boehnke wrote: |
fjb_saper wrote: |
chris boehnke wrote: |
Do I need to use the MQRFH2 header??
thanks. |
Absolutely not. You are not doing pub/sub.
Pub/sub will require you to use an RFH2 hdr...
The question for p2p is really do I want to use an RFH2? It depends on the targetClient ... is it MQ or JMS? Do you need to describe message characteristics outside of the payload??
Enjoy  |
Earlier I was using the http request node and sending the message to web servies in the request message flow by adding the JMS header.
The JMS header information what I was adding is here:
CREATE COMPUTE MODULE GeocodeODSServiceFanOut_AddJMSHeaders
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
-- CALL CopyMessageHeaders();
CALL CopyEntireMessage();
-- If there is no RFH2 header, add one
IF CARDINALITY(OutputRoot.MQRFH2.*[]) = 0 THEN
CREATE NEXTSIBLING OF OutputRoot.MQMD DOMAIN 'MQRFH2';
END IF;
-- Set MQRFH2 struct fields
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR ';
-- Set the JMS destination and reply fields
SET OutputRoot.MQRFH2.jms.Dst = 'queue:///ESB.SVC.REQUEST';
SET OutputRoot.MQRFH2.jms.Rto = 'queue:///ESB.SVC.REPLY';
SET OutputRoot.MQRFH2.mcd.Msd = 'jms_text';
-- Set MQRFH2 User attributes
SET OutputRoot.MQRFH2.usr = NULL;
RETURN TRUE;
END;
Now I am NOT using the destination as the web services and I am sending the message to output queue. The destination application picks it up and places the reply message on the reply message flow's input queue.
In this case, do I need to delete the whole JMS header(the code what I mentioned above) or part of it?
Please suggest.
Thanks. |
I think that if you want to send the data directly to the queue, then there is no need of jms header and you can delete the entire code of jms you have used. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 27, 2007 5:52 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You don't need an RFH2 for Aggregation to work.
You don't... need an RFH2 for JMS to work - but it can come in handy.
You might want an RFH2 with Message Broker in general, because of the MCD folder and the Message Domain, Type and Format fields. But you need to expect them, and code your flows to deal with what happens if they are set or not set. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
chris boehnke |
Posted: Wed Jun 27, 2007 5:57 am Post subject: Re: When do we use MQRFH2 header? |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
I am sending the "response message from destination application + Original input message in request" to generate a reply message in the reply message flow. I am using Stylesheet to translate the message in XML Translation node.
I am sending the message+Environment variables to XMLTranslation node(Stylesheet path is defined in XMLT node).
Our Stylesheet person is saying that the message traslation is occuring properly with his tools but when I use the same Stylesheet in XMLTransformation node, I am getting the "Translation error by Stylesheet". I dont see any further information in Exception tree and also in Broker logs.
Here is the message tree what I am sending to the XML Transformation node:
Message
Properties
MQMD
XMLNS
AdapterResponses
Request
msg_ESBMESSAGEHEADERGEOCODS
Response
Envelope
LocalEnvironment
ComIbmXslXmltStylesheetname = /home/wmqi/Stylesheets/transformations/GeoOdsService_To_Copybook.xsl
Environment
Variables
SOA
WestfieldStyleSheetDirectory = /home/wmqi/Stylesheets
StyleSheetName_Req = /transformations/Copybook_To_GeoOdsService.xsl
DocumentNamespace =
replyMsgId = 414d51204d514d494d53473032424b31b3bd7146156f0720
ReplyFormat = MQSTR
DocumentName = msg_ESBMESSAGEHEADERGEOCODS
ExceptionList
Do you think the Environment variables affect the translation in XMLTransformation node by using Stylesheets somehow???.
Please suggest.
Thanks. |
|
Back to top |
|
 |
|