-
1. Re: Issue sending java object and a file via StreamMessage
clebert.suconic Oct 14, 2010 8:04 AM (in response to sv_srinivaas)You should probably use the ZIP API and send both the object and the PDF in a single file.
Or you could send two messages.
You can't have two bodies on a message.
-
2. Re: Issue sending java object and a file via StreamMessage
clebert.suconic Oct 14, 2010 8:04 AM (in response to clebert.suconic)1 of 1 people found this helpfulIf you use message group, you're sure both messages will arrive at the same consumer (case you use two messages)
-
3. Re: Issue sending java object and a file via StreamMessage
sv_srinivaas Oct 19, 2010 6:55 AM (in response to clebert.suconic)Clebert, Thanks a lot for your quick response. I tried the zip file approach and it worked fine but we do see some performance issues with large files.
Tried the second approach by grouping messages where I'm sending the file (StreamMessage) as the first mesage and then the java object (ObjectMessage) as the second message both having the same group id. I'm using MDB (poolsize 5) as the consumer but the messages are NOT read sequentially because I see the overlapping print statements from mdb in console.
Also I'd like to know when the messages are grouped, is the order of messages guaranteed? because in my case I want the file to be read always before the object is read. Tried setting the message priorities but still I could not see that happening.
-
4. Re: Issue sending java object and a file via StreamMessage
ataylor Oct 19, 2010 7:29 AM (in response to sv_srinivaas)If 2 messages have the same group id then they will be consumed by the same consumer gauranteeing the order, are you saying this is not the case?
if so could you provide a standalone test case to demonstrate the issue.
-
5. Re: Issue sending java object and a file via StreamMessage
sv_srinivaas Oct 20, 2010 12:08 AM (in response to ataylor)Andy, yes everything works now, it was a typo, I had used JMSXGROUPID instead of JMSXGroupID. Thanks a lot!
-
6. Re: Issue sending java object and a file via StreamMessage
clebert.suconic Oct 20, 2010 12:26 AM (in response to sv_srinivaas)Did you look at the support for large messages?
Depending on the size of your messages.. maybe that would fit well for you... especially the large messaging streaming.
Look at the large message chapter.. it has some cool information.
-
7. Re: Issue sending java object and a file via StreamMessage
sv_srinivaas Oct 20, 2010 1:21 AM (in response to clebert.suconic)Clebert, thanks for the info, infact I've implemented the large message streaming already and only when I tried sending an object along with the large file I had issues. Then as you said I tried to zip the object along with the large file but thats where I had performance issues while serializing the object and compressing it.
But now I'm streaming the large file (upto 45mb) and sending the object as a separate message but both grouped together and performance is much better this time. We're using SFTP before for file upload/download and now we are replacing the same with hornetq/ jms.
Thanks to the hornetq team for giving us this wonderful framework and the excellent support you provide.