You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by kj1003 <ko...@lmco.com> on 2006/04/13 13:47:30 UTC

Transfering Files

Hi,

We are using ActiveMQ to transfer files by converting them into byte arrays
and sending an object message. Is there a better way of doing a file
transfer? How should we handle huge files? Does ActiveMQ has any maximum
message limit or is it limited only by the RAM? We are thinking of breaking
the file up and use something like message grouping. Any better suggestions?

Thanks.
--
View this message in context: http://www.nabble.com/Transfering-Files-t1443761.html#a3898808
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Transfering Files

Posted by Rob Davies <ra...@gmail.com>.
On 14 Apr 2006, at 12:30, kj1003 wrote:

>
> Thanks. So this always assumes non-transactional and autocommit?
yes - correct.
> --
> View this message in context: http://www.nabble.com/Transfering- 
> Files-t1443761.html#a3915307
> Sent from the ActiveMQ - User forum at Nabble.com.
>


Re: Transfering Files

Posted by kj1003 <ko...@lmco.com>.
Thanks. So this always assumes non-transactional and autocommit? 
--
View this message in context: http://www.nabble.com/Transfering-Files-t1443761.html#a3915307
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Transfering Files

Posted by Rob Davies <ra...@gmail.com>.
answers inlined:

On 13 Apr 2006, at 15:10, kj1003 wrote:

>
> Thanks. Actually did look at it but streams looked like good  
> candidate for
> continues data flow. How are they used to send files?
You would read an individual file with a FileInputStream  - piped to  
the ActiveMQOutputStream (using  PipedInputStream) - and you might  
use a DeflatorOutputStream (compression might help performance)  
before the ActiveMQOutputStream - and have the reverse at the  
consumer end.
> Do you open a
> inputStream everytime a file is published and close it to indicate  
> the end
> of file?
Yes - a close on an ActiveMQOutputStream will close the  
ActiveInputStream on the other end.
> From what I could let it looks like it does not expose session. May
> be I am not reading this right. If so how can we call explicit commit?
You can't - commit semantics aren't used - it's a Stream.
> Also
> the other thing that is not clear is how to set message header  
> properties
> (since this does not expose messages) and filters for subscribers. Can
> properties be set using the properties parameter in the constructor?
Correct - you use the properties in the Constructor for the  
ActiveMQOutputStream and Selector on the ActiveMQInputStream.
>
> Thanks again.
>
>
> --
> View this message in context: http://www.nabble.com/Transfering- 
> Files-t1443761.html#a3901159
> Sent from the ActiveMQ - User forum at Nabble.com.
>

cheers,

Rob


Re: Transfering Files

Posted by kj1003 <ko...@lmco.com>.
Thanks. Actually did look at it but streams looked like good candidate for
continues data flow. How are they used to send files? Do you open a
inputStream everytime a file is published and close it to indicate the end
of file? From what I could let it looks like it does not expose session. May
be I am not reading this right. If so how can we call explicit commit? Also
the other thing that is not clear is how to set message header properties
(since this does not expose messages) and filters for subscribers. Can
properties be set using the properties parameter in the constructor? 

Thanks again.


--
View this message in context: http://www.nabble.com/Transfering-Files-t1443761.html#a3901159
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Transfering Files

Posted by Rob Davies <ra...@gmail.com>.
I'd recommend that you look at: http://www.activemq.org/JMS+Streams

cheers,

Rob

On 13 Apr 2006, at 12:47, kj1003 wrote:

>
> Hi,
>
> We are using ActiveMQ to transfer files by converting them into  
> byte arrays
> and sending an object message. Is there a better way of doing a file
> transfer? How should we handle huge files? Does ActiveMQ has any  
> maximum
> message limit or is it limited only by the RAM? We are thinking of  
> breaking
> the file up and use something like message grouping. Any better  
> suggestions?
>
> Thanks.
> --
> View this message in context: http://www.nabble.com/Transfering- 
> Files-t1443761.html#a3898808
> Sent from the ActiveMQ - User forum at Nabble.com.
>