You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sarfaraj <sa...@gmail.com> on 2013/04/03 20:49:44 UTC

Delete files in SFTP, only when route completed successfully

Hi,

I have a route with SFTP consumer.

I added delete=true in SFTP component. What happen now, if we got exception
in route still its deleting the file. I want to delete only when it success
not in Exception case..

Any idea please ?

/Sarfaraj



--
View this message in context: http://camel.465427.n5.nabble.com/Delete-files-in-SFTP-only-when-route-completed-successfully-tp5730295.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Delete files in SFTP, only when route completed successfully

Posted by sarfaraj <sa...@gmail.com>.
I handled the exception that's why it gets deleted ?



--
View this message in context: http://camel.465427.n5.nabble.com/Delete-files-in-SFTP-only-when-route-completed-successfully-tp5730295p5730445.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Delete files in SFTP, only when route completed successfully

Posted by Claus Ibsen <cl...@gmail.com>.
The file is being deleted at the end of the route. If the exchange
does not have any exceptions at the end of the route.

So it depends what exceptions is being thrown and how - if you handle that.
You do not post much details about your route and what exception is thrown etc.

Generally when asking for help, then add details that can help people
to give better answers, than writing a quick mail.



On Thu, Apr 4, 2013 at 8:07 AM, sarfaraj <sa...@gmail.com> wrote:
> Or do I need to remove "delete=true" from SFTP consumer and explicitly delete
> when route completed successfully ?
>
> There is no other way to do so ?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Delete-files-in-SFTP-only-when-route-completed-successfully-tp5730295p5730308.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
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

Re: Delete files in SFTP, only when route completed successfully

Posted by sarfaraj <sa...@gmail.com>.
Or do I need to remove "delete=true" from SFTP consumer and explicitly delete
when route completed successfully ?

There is no other way to do so ?



--
View this message in context: http://camel.465427.n5.nabble.com/Delete-files-in-SFTP-only-when-route-completed-successfully-tp5730295p5730308.html
Sent from the Camel - Users mailing list archive at Nabble.com.