You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by trbvm <j2...@trbvm.com> on 2016/01/20 09:47:33 UTC

FTP concurent file downloads

Hello,

I'd like to develop a route which would fetch the list of files from FTP and
then send file names to a queue, from where multiple hosts and threads would
download each file using pollEnrich and move it to a done folder. 

The documentation states the ftp consumer is not thread safe. Does it mean I
can't to it the way I want? The first implementation seems to work, only
moving of files fails. But I'm worriead about thread safety more

Thanks in advance!



--
View this message in context: http://camel.465427.n5.nabble.com/FTP-concurent-file-downloads-tp5776447.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP concurent file downloads

Posted by trbvm <j2...@trbvm.com>.
cool. Thanks!

so, in summary I just can't have

from("ftp:host/folder").to(queue)

more then once, but I can have multiple from with diffrent folders on the
same host? Right?




--
View this message in context: http://camel.465427.n5.nabble.com/FTP-concurent-file-downloads-tp5776447p5776450.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP concurent file downloads

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Ah its only when you use ftp in a route with from, that you cannot do
this concurrently. But if you use pollEnrich and already uses parallel
threads for this, then each thread can download a file. Though mind
that you will still have the "challenge" if you try to download the
same file by multiple threads. So you may need to find a way to be
sure each thread download their unique file.



On Wed, Jan 20, 2016 at 9:47 AM, trbvm <j2...@trbvm.com> wrote:
> Hello,
>
> I'd like to develop a route which would fetch the list of files from FTP and
> then send file names to a queue, from where multiple hosts and threads would
> download each file using pollEnrich and move it to a done folder.
>
> The documentation states the ftp consumer is not thread safe. Does it mean I
> can't to it the way I want? The first implementation seems to work, only
> moving of files fails. But I'm worriead about thread safety more
>
> Thanks in advance!
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-concurent-file-downloads-tp5776447.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2