You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by kknd2015 <su...@gmail.com> on 2013/05/28 14:20:58 UTC

how does force stop a ftp consumer immediately?

I have a ftp consumer to pull some huge files by a specified pattern. I need
to stop it without stoping the camel context and jvm.
I have tryied the stoproute with abort option, also set the ShutdownStrategy
to 5 seconds.

   camelContext.getShutdownStrategy().setTimeout(5);
   camelContext.getShutdownStrategy().setTimeUnit(TimeUnit.SECONDS);
   camelContext.stopRoute(routeName, 2, TimeUnit.SECONDS, false);

but it can't work if the ftpconsumer has loginned into ftp and start pull
files. it need spend 5-10minutes to stop.

I try to interrrupt the binded thread, it didn't work.

any other way i can try?





--
View this message in context: http://camel.465427.n5.nabble.com/how-does-force-stop-a-ftp-consumer-immediately-tp5733354.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: how does force stop a ftp consumer immediately?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can possible enable streamDownload which may be able to break the
download if shutting down.

Camel uses Commons Net 3.1. So you can also look at this docs/user
forums etc to see if they have a solution to this.
Maybe there is a piece missing in camel-ftp to make this easy out of the box?

On Tue, May 28, 2013 at 2:20 PM, kknd2015 <su...@gmail.com> wrote:
> I have a ftp consumer to pull some huge files by a specified pattern. I need
> to stop it without stoping the camel context and jvm.
> I have tryied the stoproute with abort option, also set the ShutdownStrategy
> to 5 seconds.
>
>    camelContext.getShutdownStrategy().setTimeout(5);
>    camelContext.getShutdownStrategy().setTimeUnit(TimeUnit.SECONDS);
>    camelContext.stopRoute(routeName, 2, TimeUnit.SECONDS, false);
>
> but it can't work if the ftpconsumer has loginned into ftp and start pull
> files. it need spend 5-10minutes to stop.
>
> I try to interrrupt the binded thread, it didn't work.
>
> any other way i can try?
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/how-does-force-stop-a-ftp-consumer-immediately-tp5733354.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen