You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Nafees <s....@gmail.com> on 2012/06/09 10:58:51 UTC
FTP
Hi
I am having a route in which we copy files from FTP server to some folder
and stops the route when all files are processed.
We are having a mechanism to suspend, resume or cancel this route.
My route is this:
from("ftp://ftpuser@192.168.1.43/MSC_SAMPLE?password=ftpuser123&passiveMode=false&pollStrategy=#optimerPoll&throwExceptionOnConnectFailed=true&maximumReconnectAttempts=0&localWorkDirectory=/tmp")
routeId("ftp_route").noAutostartup().to("file:///home/nafees/mediation/09-Jun-2012/MSC_Huawei/download?noop=true&autoCreate=false").to("bean:helper?ftpRouteStopper");
if(command.equals("Start")) { camelServer.startRoute("ftp_route");}
... similarly for Resume .. Pause and cancel.. we call appropriate options
over camel.
E.g. we have some 400 files in a folder in FTP server, suppose 150 files
have been downloaded into some folder, I want to suspend the route, we are
able to suspend the route. But, when we are resuming the route , it again
starts copying from first file.
Is there any mechanism in which , we could instruct it start copying from
151st file.
Or how to solve these kind of issue.
Please Help me
Thanks
Nafeesa
--
View this message in context: http://camel.465427.n5.nabble.com/FTP-tp5714245.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: FTP
Posted by Nafees <s....@gmail.com>.
HI Claus,
Thanks for your quick response , I have added idempotent=true in ftp options
and it works for my case.
Thank you so much.
Nafees
--
View this message in context: http://camel.465427.n5.nabble.com/FTP-tp5714245p5714249.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: FTP
Posted by Claus Ibsen <cl...@gmail.com>.
On Sat, Jun 9, 2012 at 10:58 AM, Nafees <s....@gmail.com> wrote:
> Hi
>
> I am having a route in which we copy files from FTP server to some folder
> and stops the route when all files are processed.
>
> We are having a mechanism to suspend, resume or cancel this route.
>
> My route is this:
> from("
> ftp://ftpuser@192.168.1.43/MSC_SAMPLE?password=ftpuser123&passiveMode=false&pollStrategy=#optimerPoll&throwExceptionOnConnectFailed=true&maximumReconnectAttempts=0&localWorkDirectory=/tmp
> ")
>
> routeId("ftp_route").noAutostartup().to("file:///home/nafees/mediation/09-Jun-2012/MSC_Huawei/download?noop=true&autoCreate=false").to("bean:helper?ftpRouteStopper");
>
>
>
> if(command.equals("Start")) { camelServer.startRoute("ftp_route");}
> ... similarly for Resume .. Pause and cancel.. we call appropriate options
> over camel.
>
>
> E.g. we have some 400 files in a folder in FTP server, suppose 150 files
> have been downloaded into some folder, I want to suspend the route, we are
> able to suspend the route. But, when we are resuming the route , it again
> starts copying from first file.
>
> Is there any mechanism in which , we could instruct it start copying from
> 151st file.
>
>
You need to either delete/move the files after your have processed them.
Or use a persistent idempotent repository, so Camel knows which files
previously have been processed.
Read about the these options here
http://camel.apache.org/file2
As the ftp component inherits the options from the file component.
Or how to solve these kind of issue.
>
> Please Help me
>
> Thanks
>
> Nafeesa
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/FTP-tp5714245.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen