On Sat, Jun 9, 2012 at 10:58 AM, Nafees <[email protected]> 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://[email protected]/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: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen