Author |
Message
|
chris boehnke |
Posted: Tue Jul 17, 2007 5:07 am Post subject: MQ JMS error while reading a message off the queue |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
I am getting this error message when trying to get the message off the queue:..I am reading the messages through JMS.
MQJMS1050: The MQRFH2 header has an incorrect format
I wasn't getting this message when message broker was not involved.
Any suggestions please???
Thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jul 17, 2007 5:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Don't double post; pick a likely looking section and plump. The moderators can always move it later!
http://www.mqseries.net/phpBB2/viewtopic.php?t=38319&highlight=
So it works until the broker is involved? How is broker generating the RFH2? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
chris boehnke |
Posted: Tue Jul 17, 2007 5:34 am Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi Vitor,
Here I am using a Compute node to generate the RFH2 header
CREATE COMPUTE MODULE FlowABC_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.REQUEST';
SET OutputRoot.MQRFH2.jms.Rto = 'queue:///ESB.REPLY';
SET OutputRoot.MQRFH2.mcd.Msd = 'jms_text';
-- Set MQRFH2 User attributes
SET OutputRoot.MQRFH2.usr = NULL;
RETURN TRUE;
END;
Please let me know whether I am missing something or need to eliminate anything???.
Thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jul 17, 2007 5:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I think your problem is that you're creating a NEXTSIBLING of MQMD. The first sibling of MQMD is the message body, the RFH2 will be the next and hence it's in the wrong place.
A Trace node will tell the tale. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jul 17, 2007 6:17 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Um...
I believe that NEXTSIBLING is the correct place for MQRFH2 tree.
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/topic/com.ibm.etools.mft.doc/ac12610_.htm
Either the MQMD.Format field is not set to MQFMT_RF_HEADER_2 or the MQRFH2.Format is not properly set to MQFMT_STRING - I see the constant 'MQSTR ', but it's always better to use the constant.
Also, I'm not sure that MQRFH2.Format is an MQRFH2.Field. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jul 17, 2007 6:46 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
jefflowrey wrote: |
Um...
I believe that NEXTSIBLING is the correct place for MQRFH2 tree.
|
Granted, but if you've already done a CopyEntireMessage doesn't MQMD already have a sibling called Body? Or am I being thicker than a whale sandwich?
(It's the day for it! ) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jul 17, 2007 6:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Vitor wrote: |
Or am I being thicker than a whale sandwich? |
I'll not make any cracks about your weight, as I've no basis to judge...
CREATE .. NEXTSIBLING will insert the MQRFH2 as the next sibling. So, afaik, that line of code is actually correct.
But only a Trace knows for sure. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
chris boehnke |
Posted: Tue Jul 17, 2007 8:01 am Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
jefflowrey wrote: |
Vitor wrote: |
Or am I being thicker than a whale sandwich? |
I'll not make any cracks about your weight, as I've no basis to judge...
CREATE .. NEXTSIBLING will insert the MQRFH2 as the next sibling. So, afaik, that line of code is actually correct.
But only a Trace knows for sure. |
Hi Guys,
Here is the message flows scenario:
FanOut flow: Input queue -> Aggregate Control -> Compute(XSLT transformation) -> Compute node(Add Jms Header, the code what I mentioned above) -> Aggregate request
FanIn flow: Original Msg + Reply from Destination App => Aggregate reply -> Compute (transformation using XSLT) -> MQoutput node(output queue)
The problem is not in the request message flow(FanOut).
The problem is in the reply message after translation and getting off the message from output queue.
Suggestions please |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jul 17, 2007 8:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
jefflowrey wrote: |
Either the MQMD.Format field is not set to MQFMT_RF_HEADER_2 or the MQRFH2.Format is not properly set to MQFMT_STRING - I see the constant 'MQSTR ', but it's always better to use the constant.
Also, I'm not sure that MQRFH2.Format is an MQRFH2.Field. |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
chris boehnke |
Posted: Tue Jul 17, 2007 10:57 am Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
jefflowrey wrote: |
jefflowrey wrote: |
Either the MQMD.Format field is not set to MQFMT_RF_HEADER_2 or the MQRFH2.Format is not properly set to MQFMT_STRING - I see the constant 'MQSTR ', but it's always better to use the constant.
Also, I'm not sure that MQRFH2.Format is an MQRFH2.Field. |
|
I see the MQMD.Format = MQRFH2 and MQRFH2.Format = 'MQSTR '.
Here is the message tree structure:
Message
Properties
MQMD
SourceQueue = ESB.REQUEST
Transactional = true
Encoding = 546
CodedCharSetId = 437
Format = MQHRF2
Version = 2
Report = 0
MsgType = 1
Expiry = -1
Feedback = 0
Priority = 4
Persistence = 0
MsgId = 414d51204d514d494d53473032424b31b3bd714631050f20
CorrelId = 000000000000000000000000000000000000000000000000
BackoutCount = 0
ReplyToQ = ESB.REPLY
ReplyToQMgr = MQBK1
UserIdentifier = mqm
AccountingToken = 16010515000000cd79d57c274a9255474f7a595fbb000000000000000000000b
ApplIdentityData =
PutApplType = 11
PutApplName = _DELETE\\Desktop\\rfhutilc.exe
PutDate = 2007-07-17
PutTime = 18:50:44.260
ApplOriginData =
GroupId = 000000000000000000000000000000000000000000000000
MsgSeqNumber = 1
Offset = 0
MsgFlags = 0
OriginalLength = -1
MQRFH2
XMLNS
Envelope
\n
Body
\n
Message
\n
\n
LocalEnvironment
ComIbmAggregateControlNode
aggregateName = GPS_AGG
Environment
Variables
SOA
WestfieldStyleSheetDirectory = /home/wmqi/Stylesheets
DocumentNamespace =
replyMsgId = 414d51204d514d494d53473032424b31b3bd714631050f20
ReplyFormat = MQRFH2
DocumentName = Message
Root
Properties
MQMD
SourceQueue
Transactional
Encoding
CodedCharSetId
Format
MQRFH2
Version
Report
MsgType
Expiry
Feedback
Priority
Persistence
MsgId
CorrelId
BackoutCount
ReplyToQ
ReplyToQMgr
UserIdentifier
AccountingToken
ApplIdentityData
PutApplType
PutApplName
PutDate
PutTime
ApplOriginData
GroupId
MsgSeqNumber
Offset
MsgFlags
OriginalLength
XMLNS
Envelope
\n
Body
\n
ExceptionList
Let me know if I oversee something.
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jul 17, 2007 11:01 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You seem to have two MQMD and MQRFH2 trees in there.
This might be part of the problem. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jul 18, 2007 2:46 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Let me be candid.
You are sending a JMS message over MQ. You are not setting any specific values to the RFH2 header.
Why add an RFH header at all? The JMS consumer will not care whether there is an RFH header or not....
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|