Posted: Wed Apr 06, 2005 6:44 am Post subject: Writing a message from a queue to a flat file
Newbie
Joined: 05 Apr 2005 Posts: 1 Location: Minnesota
I am trying to take a message off a queue and write the data to a "flat file". I am getting the connection to the queue manager and putting the message into a string in Java. However when I look at the data that is in the string (while debugging or when I write it out), the data is "messy". The RFH and other headers are all a bunch of computer chars and the rest looks like this:
Something like XML? I am fairly new to programming and totally new to MQ, so any help would be greatly appreciated. I have tried matching my characterSet to the original setting when the message was first put on the queue I am trying to pull off of, and that still didn't change the data into something that is good to write out to a flat file. What other formatting or decoding can I do to get this more into a string format or a nice format for a archiving flat file?
Also for some reason I am not getting the entire message.... (Max message length setting is sufficient).
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
It sounds like you are sending a JMS based message to a non-JMS based receiver. The header you have described is the RFH2 header that contains the JMS properties of the message. Have your sender specify a targclient of MQ on the Q destination and the header won't be added. This gives some more info:
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