You cann't simply interrupt the reception in the middle of the file transfer
as GenericFileConsumer and all it's specializations (in your case
FtpConsumer) are ShutdownAware, see
http://camel.apache.org/graceful-shutdown.html for the details.

> In my case, the route would run every 2 minutes (aprox.), but it is
> possible that in some cases there are high-volume files that take longer
> than 2 minutes. I don't want to long checking more than 2 minutes.

I don't get exactly your point here, if the file you want to transfer is for
example 3TB big, you should wait until the transfer is complete or the Camel
shutdown timeout has been reached (see below)

Just assume that right now there's a file transfer of yours is running, then
you cann't simply interrupt/break that transfer immediately (even when using
CamelContext.stopRoute()) as Camel will try to shutdown gracefully, however
if the transfer takes longer than 300 seconds (is the default *shutdown now*
timeout) then the transfer will be interrupted and Camel will just *force*
the shutdown. If the Camel's default DefaultShutdownStrategy is not good
enough for you, you could also make use of your own implementation:

CamelContext.setShutdownStrategy(new MyShutdownStrategy(...));

If you keep on the DefaultShutdownStrategy implementation of Camel then you
could also influence that default timeout (300 seconds) as well using the
offered API's:

CamelContext.getShutdownStrategy.setTimeout()
CamelContext.getShutdownStrategy.setTimeUnit()

Babak

--
View this message in context: 
http://camel.465427.n5.nabble.com/FT2-How-do-I-know-the-list-of-file-that-a-Consumer-FTP2-is-receiving-tp5088669p5089349.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to