You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by polanki <va...@pimco.com> on 2016/05/02 23:54:35 UTC

Collecting feeds from multiple sources to multiple destinations

Our application need to collect files from many (say 100) ftp servers in
different time period ranges.
For example from 
FTPServer1 - 8AM-8PM
FTPServer2 - 1AM-3PM
.
.
.
FTPServer100 - 5AM-7AM

Can camel scheduledExecutorService helps for this?
Some possible solutions I can think of. Please suggest.

Creating 100 routes in a context with different initialDelay (To accommodate
start time constraint) is better solution? In this case stopping particular
route at end time is issue?
Stopping the context stops all routes.
or 

By using Java ScheduledExecutorService, Schedule 100 contexts, keep running
and stop contexts individually based on end time. Disadvantage with this is
I need to have 100 threads to run 100 camel contexts simultaneously.




--
View this message in context: http://camel.465427.n5.nabble.com/Collecting-feeds-from-multiple-sources-to-multiple-destinations-tp5782092.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Collecting feeds from multiple sources to multiple destinations

Posted by Claus Ibsen <cl...@gmail.com>.
You can configure the ftp endpoints to use a shared thread pool.
http://camel.apache.org/threading-model.html
http://camel.apache.org/polling-consumer.html

On Mon, May 2, 2016 at 11:54 PM, polanki <va...@pimco.com> wrote:
> Our application need to collect files from many (say 100) ftp servers in
> different time period ranges.
> For example from
> FTPServer1 - 8AM-8PM
> FTPServer2 - 1AM-3PM
> .
> .
> .
> FTPServer100 - 5AM-7AM
>
> Can camel scheduledExecutorService helps for this?
> Some possible solutions I can think of. Please suggest.
>
> Creating 100 routes in a context with different initialDelay (To accommodate
> start time constraint) is better solution? In this case stopping particular
> route at end time is issue?
> Stopping the context stops all routes.
> or
>
> By using Java ScheduledExecutorService, Schedule 100 contexts, keep running
> and stop contexts individually based on end time. Disadvantage with this is
> I need to have 100 threads to run 100 camel contexts simultaneously.
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Collecting-feeds-from-multiple-sources-to-multiple-destinations-tp5782092.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