Posted: Thu May 22, 2003 8:02 am Post subject: Parsing out MQRFH2 using Java API's for MQSeries
Novice
Joined: 08 Feb 2002 Posts: 13
Hello
Sorry for cross posting. But i need help badly.
I have a JMS application dropping a message into MQSeries Queue.
The data from MQSeries Queue is read by a Java program written using Java Base Classes for MQ. The problem is that JMS application is appending MQRFH2 to the data and also the message header have format typeas MQRFH2. My Java program is reading a message from the Queue by setting Format as MQFMT_STRING. How can i have my Java application (which is using MQ Base classes for Java) to ignore the MQRFH2 header info and read the real payload. Any code samples would greatly help.
I do realize that JMS application can setTargetClient for NonJMS clients.But at this point, i can't have that done due to some internal issues.
So i kindly request any help that someone can provide in regards to
How can a Java Application written using Java Base classes for MQ can read a message dropped by JMS Application.
Thanks in advance
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
You could always use some of the methods in the MQMessage class to read over the fields that you aren't interested in. I believe that the RFH keeps its length at the front (eye catcher, version, length?). Once you get the length, you could skip the rest of the RFH.
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