camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvahdat <>
Subject Re: FT2: How do I know the list of file that a Consumer FTP2 is receiving?
Date Tue, 20 Dec 2011 16:27:02 GMT
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 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:



View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message