Author |
Message
|
mbieren |
Posted: Wed Oct 05, 2005 4:04 am Post subject: RFH Header |
|
|
Newbie
Joined: 05 Oct 2005 Posts: 3 Location: Muenchen
|
Hi there,
I have messages with an RFH Header created by a Java Programm. Can somebody point me to the C example to read out the messages _without_ the RFH-Stuff. Is it an MQ Option ? I am using a Simple MQGET - Call as described in the examples.
Kind regards
Michael |
|
Back to top |
|
 |
Nigelg |
Posted: Wed Oct 05, 2005 4:36 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
No, it is not a WMQ option.
Once you get the msg, read the StrucLength from the RFH header. The next part of the msg starts at that offset into the whole msg. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
fschofer |
Posted: Wed Oct 05, 2005 4:58 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Hi,
take a look at Support Pack IH03 => mqcapture.c
Greetings
Frank |
|
Back to top |
|
 |
mbieren |
Posted: Wed Oct 05, 2005 7:11 am Post subject: |
|
|
Newbie
Joined: 05 Oct 2005 Posts: 3 Location: Muenchen
|
Like this
Code: |
/* check the message format for an RFH */
if ((memcmp(msgdesc.Format, MQFMT_RF_HEADER, sizeof(MQFMT_RF_HEADER) - 1) == 0) ||
(memcmp(msgdesc.Format, MQFMT_RF_HEADER_2, sizeof(MQFMT_RF_HEADER_2) - 1) == 0))
{
rfhlength = checkRFH(msgdata, datalen, &msgdesc);
}
/* and then */
fwrite(msgdata + rfhlength, datalen - rfhlength, 1, outFile);
|
This is strange. How can theses JavaGuys include their stuff in the MessageBody.
Anyway I have filtered it with :
Code: |
jms_crap = "</jms>"
jmspos = mqmessage.find (jms_crap)
if jmspos >= 0:
encoded = mqmessage [jmspos + len (jms_crap):].lstrip ()
|
Cause "</jms>" plus some blanks is the last stuff
Kind regards
Michael |
|
Back to top |
|
 |
EddieA |
Posted: Wed Oct 05, 2005 8:31 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Not always. It depends on the length of the data in the last "folder".
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
mbieren |
Posted: Thu Oct 06, 2005 12:45 am Post subject: |
|
|
Newbie
Joined: 05 Oct 2005 Posts: 3 Location: Muenchen
|
we will see *ggg*
I know the stuff that has to come after </jms> I will check for it and raise an exception if I did not see what I expect.
Kind regards
Michael |
|
Back to top |
|
 |
|