ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Is it possible to have WMB ignore the MQHRF2 format?

Post new topic  Reply to topic
 Is it possible to have WMB ignore the MQHRF2 format? « View previous topic :: View next topic » 
Author Message
murdeep
PostPosted: Thu Sep 29, 2011 8:30 am    Post subject: Is it possible to have WMB ignore the MQHRF2 format? Reply with quote

Master

Joined: 03 Nov 2004
Posts: 211

Hi, I don't think this is as crazy as it sounds in the subject title.

We have a message flow that we route messages to in order to log messages into a database, our message warehouse. Our message warehouse consists of a table that contains the MQMD attributes as the parent that has a foreign key relationship to a payload table.

We have introduced a JMS application and when we process the message through our logging flow only the actual payload that follows the RFH is logged which makes sense since the RFH is really not part of the application payload.

What I'd like to do is log then entire message buffer from a WMQ perspective so that would include the RFH. So I am trying to figure out how to get WMB to ignore the MQHRF2 format.

The only thing I can think of is a non-WMB MQ app that would preprocess the message before we route it to the WMB logging flow that sets the MQMD.Format to something other that MQHRF2 (i.e. MQFMT_NONE) but I'd like to see if we can do it in WMB so I avoid having this application external to the broker.

Any suggestions? is it even possible to do in WMB or does WMB always recognize the MQHRF2 format if it is set?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Sep 29, 2011 8:55 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Broker follows whatever MQ tells it.

IF the MQMD.Format = MQSTR then everything after the end of the MQMD is reated as the message payload.
If the MQMD.Format contains something else (eg MQRFH2) then the header is chained to the MQMD.
And so on thein there is something in the .Format field that says, 'The next thingy is the payload data and not another header'.

broker will read the WMQ message and format the various headers automatically.

When I've been storing in a DB messages that may or may not contain an MQRFH2 header I've always allocaed a BLOB (or similar) for both the MQMD, the MQRFH2 and the Unparsed data.

Bear in mind that if the MCD folder contains message set data then broker in its infinite wisdom will try to parse the message with that rather than the model defined in the input node.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
murdeep
PostPosted: Thu Sep 29, 2011 9:14 am    Post subject: Reply with quote

Master

Joined: 03 Nov 2004
Posts: 211

Ok, I think I figured it out. I use the ASBITSTREAM function. So if I set my code like the following:

Code:

DECLARE refMQRFH2 REFERENCE TO InputRoot.MQRFH2;
-- CALL CopyMessageHeaders();
CALL CopyEntireMessage();
SET OutputRoot.MQMD.Format = MQFMT_NONE;
SET OutputRoot.BLOB.BLOB = ASBITSTREAM(refMQRFH2) || InputRoot.BLOB.BLOB;
SET OutputRoot.MQRFH2 = NULL;


Then the message as it appears on the output queue looks like:

Code:
 MQGET of message number 1
****Message descriptor****

  StrucId  : 'MD  '  Version : 2
  Report   : 0  MsgType : 1
  Expiry   : -1  Feedback : 0
  Encoding : 273  CodedCharSetId : 1208
  Format : '        '
  Priority : 4  Persistence : 1
  MsgId : X'414D5120514D202020202020202020209044824E227B213F'
  CorrelId : X'000000000000000000000000000000000000000000000000'
  BackoutCount : 0
  ReplyToQ       : 'Q1                                              '
  ReplyToQMgr    : 'QM                                              '
  ** Identity Context
  UserIdentifier : 'bkrsvc      '
  AccountingToken :
   X'16010515000000AB2BE9904788DC8456B5CD20DC9F030000000000000000000B'
  ApplIdentityData : '                                '
  ** Origin Context
  PutApplType    : '11'
  PutApplName    : '\MQSI\6.1\jre15\bin\java.exe'
  PutDate  : '20110929'    PutTime  : '16572010'
  ApplOriginData : '    '

  GroupId : X'000000000000000000000000000000000000000000000000'
  MsgSeqNumber   : '1'
  Offset         : '0'
  MsgFlags       : '0'
  OriginalLength : '-1'

****   Message      ****

 length - 227 bytes

00000000:  5246 4820 0200 0000 D400 0000 1101 0000 'RFH ............'
00000010:  B804 0000 4D51 5354 5220 2020 0000 0000 '....MQSTR   ....'
00000020:  B804 0000 2000 0000 3C6D 6364 3E3C 4D73 '.... ...<mcd><Ms'
00000030:  643E 6A6D 735F 7465 7874 3C2F 4D73 643E 'd>jms_text</Msd>'
00000040:  3C2F 6D63 643E 2020 6000 0000 3C6A 6D73 '</mcd>  `...<jms'
00000050:  3E3C 4473 743E 7175 6575 653A 2F2F 2F54 '><Dst>queue:///T'
00000060:  4553 542E 494E 3C2F 4473 743E 3C52 746F 'EST.IN</Dst><Rto'
00000070:  3E71 7565 7565 3A2F 2F2F 5131 3C2F 5274 '>queue:///Q1</Rt'
00000080:  6F3E 3C54 6D73 3E31 3331 3733 3135 3434 'o><Tms>131731544'
00000090:  3030 3837 3C2F 546D 733E 3C44 6C76 3E32 '0087</Tms><Dlv>2'
000000A0:  3C2F 446C 763E 3C2F 6A6D 733E 2400 0000 '</Dlv></jms>$...'
000000B0:  3C75 7372 3E3C 7369 7A65 2064 743D 2269 '<usr><size dt="i'
000000C0:  3422 3E31 353C 2F73 697A 653E 3C2F 7573 '4">15</size></us'
000000D0:  723E 2020 7465 7374 206D 6573 7361 6765 'r>  test message'
000000E0:  2032 0A                                 ' 2.             '


So when I load it into the message warehouse I just need to know that I have to tweak the MQMD.Format so it reflects reality.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Is it possible to have WMB ignore the MQHRF2 format?
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.