[
https://issues.apache.org/jira/browse/CAMEL-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16473014#comment-16473014
]
Sami Nurminen commented on CAMEL-6058:
--------------------------------------
Some thoughts:
GenericFileOperations could support concurrency. For example
changeCurrentDirectory is not safe for concurrent usage. Most operations depend
on which directory operations instance is currently. Providing absolute path as
parameter could be more natural. GenericFileOperations#retrieveFile could
return some kind Future for example. If GenericFileOperations can't be changed,
then another interface for concurrent operations could be made.
Polling could be parallel to downloading files. But polling should wait until
there is enough capacity. This could be implemented by blocking queue.
Otherwise component might queue too many files.
Another issue is ordering of files. For example if the order is alphabetical
and folder has file "a.txt" and "b.txt", then exchange having file "a.txt" must
complete before exchange having file "b.txt". Probably waiting on completion of
"parent" exchange (in this case "b.txt" waits for "a.txt") before handling
exchange forward after retrieve. This would allow downloading to start for
multiple files parallel and actual processing be ordered.
> camel-ftp - Allow concurrent download of files
> ----------------------------------------------
>
> Key: CAMEL-6058
> URL: https://issues.apache.org/jira/browse/CAMEL-6058
> Project: Camel
> Issue Type: New Feature
> Components: camel-ftp
> Reporter: Claus Ibsen
> Priority: Major
> Fix For: Future
>
>
> The ftp consumer is currently single threaded, and will download files in
> sequence.
> We should add functionality to allow concurrent downloads. Its a bit hard to
> do as we would need a new ftp client per download. And that client needs to
> login, and traverse to the dir where the file is, and download the file.
> And then we need to have that all work together, and report errors etc.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)