Take a look at the Controlbus component to start/stop routes
programmatically. Normally with FTP consumers, you know when to start them
(when the timer fires) but the tricky part is to know when to stop them.
You'd probably want to stop them after a period of inactivity, e.g. after
60 seconds.

There's a number of ways you could achieve this, e.g. setting a fixed timer
every time a message is consumed, and resetting the timer every time a new
message comes in. Eventually the timer will fire after the period of
inactivity has elapsed, and you'd use the Controlbus component again to
stop the route.

Perhaps it would make sense to include an "inactivity auto-suspend" feature
in the File-based components.

Hope this helps,

*Raúl Kripalani*
Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk

On Tue, Feb 24, 2015 at 8:35 AM, Svend-Ole Nielsen <
svend-ole.niel...@vehco.com> wrote:

> Hi all
>
> Is it possible to have some kind of route handling where you were to
> trigger one FTP download route after another in sync??
>
> .......
> <route>
> <from timer>
> <to direct:ftp1>
> <to direct:ftp2>
> <to direct:ftp3>
> <to direct:ftp4>
> </route>
>
> <route>
> <from direct:ftp1>
> <to ftp:......>
> <to file: ......>
> </route>
>
> <route>
> <from direct:ftp2>
> <to ftp:......>
> <to file: ......>
> </route>
>
> <route>
> <from direct:ftp3>
> <to ftp:......>
> <to file: ......>
> </route>
>
> <route>
> <from direct:ftp4>
> <to ftp:......>
> <to file: ......>
> </route>
> ............
>
> Hopefully someone has a trick up their sleeve :)
>
> Regards,
> Svend
>

Reply via email to