2 Replies Latest reply on Nov 13, 2010 2:30 AM by srinivaas venkat

    Issue with large files

    srinivaas venkat Novice

      Hi, I've an issue sending files as StreamMessage that is similar to the issue mentioned in http://community.jboss.org/message/560720#560720


      I’m using Hornetq 2.1.1 Final and JBoss 5.1.0 GA


      Basically I’d like to know if I can send smaller files also (say from 1kb to 20kb) as StreamMessage using the large message feature of Hornetq because in our case we need to send PDF files ranging from 1kb up to 45mb and I’m thinking of using a common code for this purpose.


      I tested the same and what I found is that the file transfer worked fine for files of size >= 20kb but failed for files < 20kb where only 0 KB got downloaded for files < 20kb.




      I’m using a java client for sending messages and MDB as the consumer. I've set the min-large-file-size as 180 in the connection factory that I use for sending (only) PDF files. Then for MDB,


      • If I don’t set min-large-file size in ra.xml (for MDB inbound connection) - then files of size => 20 kb gets downloaded whereas files < 20kb gets truncated. But one particular file of size 904kb alone got truncated to 900kb after download but all other files upto45mb got downloaded without issues.


      • If I set min-large-file size in ra. xml (for MDB inbound connection) to 1024 - then only files of size > 960 kb gets downloaded whereas files < 960kb gets truncated


      Also I see that the issue is only on the MDB downloading part because in all cases the files are sent to large message directory of the JMS server properly without any issues and the file gets truncated only when MDB tries to download the same.


      Attached code and the configuration files, pls help.