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 » Reading from an InputStream

Post new topic  Reply to topic
 Reading from an InputStream « View previous topic :: View next topic » 
Author Message
kuriannvv
PostPosted: Mon Sep 26, 2011 1:34 am    Post subject: Reading from an InputStream Reply with quote

Newbie

Joined: 26 Sep 2011
Posts: 3

Need help with reading the data from the message. The application that drops the message onto the queue does so as a JMS Message, therefore there are JMS properties that are read out as RFH Headers. I need to get the payload from this message, that is, just the file that is dropped onto the queue. The problem is that the file that is dropped to the queue is a compressed file (gzip). If it is a plain file (not compressed) I am able to read it out without any issues. Please could someone help with reading the compressed file from the message. Thank you.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Sep 26, 2011 5:21 am    Post subject: Re: Reading from an InputStream Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

kuriannvv wrote:
The problem is that the file that is dropped to the queue is a compressed file (gzip).

Please be precise. Why is this a problem for you? Are you receiving errors from some application because about the gzip file?

Are the sending and receiving platforms different (different o/s, Intel vs. non-Intel)?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
kuriannvv
PostPosted: Mon Sep 26, 2011 5:57 am    Post subject: Reply with quote

Newbie

Joined: 26 Sep 2011
Posts: 3

If the file is not compressed and I read it out of the queue, I am able to get the data out of the file. If it is a compressed file, I need to de-compress it and get the content out of this. When I read a compressed file out as a stream, the data gets corrupted.
When I read the content (data that is not compressed) out as a stream, the file content is the same as what was dumped onto the queue.
What I want to know is, is there any way to read the compressed file out of the MQ message without corrupting it.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Sep 26, 2011 6:31 am    Post subject: Reply with quote

Grand High Poobah

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

kuriannvv wrote:
If the file is not compressed and I read it out of the queue, I am able to get the data out of the file. If it is a compressed file, I need to de-compress it and get the content out of this. When I read a compressed file out as a stream, the data gets corrupted.
When I read the content (data that is not compressed) out as a stream, the file content is the same as what was dumped onto the queue.
What I want to know is, is there any way to read the compressed file out of the MQ message without corrupting it.

If your message is compressed (gzip) you need to make sure (from the sending side) that what you have is BytesMessage and not a TextMessage.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kuriannvv
PostPosted: Mon Sep 26, 2011 7:04 am    Post subject: Reply with quote

Newbie

Joined: 26 Sep 2011
Posts: 3

The sending system does send in a BytesMessage. The data that I read out is a Byte Message. But I seem to loose the file while I parse it for the payload.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Sep 26, 2011 7:28 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kuriannvv wrote:
But I seem to loose the file while I parse it for the payload.


Be precise.

What does it mean to parse the payload?

What does it mean to lose the file?

What is the code you have written? use [ c o d e ] tags to mark it if you decide to post it, so it is readable.
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 » IBM MQ Java / JMS » Reading from an InputStream
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.