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 » IBM MQ Java / JMS » Writing a message from a queue to a flat file

Post new topic  Reply to topic
 Writing a message from a queue to a flat file « View previous topic :: View next topic » 
Author Message
Kuzdpyro
PostPosted: Wed Apr 06, 2005 6:44 am    Post subject: Writing a message from a queue to a flat file Reply with quote

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:

<jms><Dst>queue:///ARCHIVE_QUEUE</Dst><Tms>1093228578875</Tms><Cid>A3E75F20202641295751003C</Cid><Dlv>2</Dlv></jms>

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).

Thanks for any help.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
bower5932
PostPosted: Wed Apr 06, 2005 8:27 am    Post subject: Reply with quote

Jedi Knight

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:

http://www.developer.ibm.com/tech/faq/individual?oid=2:25093
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
fjb_saper
PostPosted: Wed Apr 06, 2005 12:28 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Or use Java/JMS to read your message. It will not put the RFH2 header in your payload.

Enjoy
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Writing a message from a queue to a flat file
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.