You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Nicky Sandhu <ni...@hotmail.com> on 2007/08/20 20:05:00 UTC

Consuming FTP file and deleting after processing

The usecase is like this
Transfer the file and put it into some queue.
from("sftp://someserver/somedir/somefile").to("queue:somequeue");

Then delete it from the server if and only if the above is successful and
not if it fails.

How can the above be accomplished? 



-- 
View this message in context: http://www.nabble.com/Consuming-FTP-file-and-deleting-after-processing-tf4300515s22882.html#a12240893
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Consuming FTP file and deleting after processing

Posted by Nicky Sandhu <ni...@hotmail.com>.

James.Strachan wrote:
> 
> 
> I've raised a JIRA to track this; hopefully we can add a hook so
> file/ftp style components can add a 'delete on successful process'
> hook.
> https://issues.apache.org/activemq/browse/CAMEL-123
> 

Super !


James.Strachan wrote:
> 
> 
> We might also want to look at reusing the file components
> FileProcessStrategy to handle different kinds of 'delete' (e.g. using
> a lock file, deleting or moving etc)
> https://issues.apache.org/activemq/browse/CAMEL-124
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> 

You are one step ahead of me. Nice :)
-- 
View this message in context: http://www.nabble.com/Consuming-FTP-file-and-deleting-after-processing-tf4300515s22882.html#a12356742
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Consuming FTP file and deleting after processing

Posted by James Strachan <ja...@gmail.com>.
On 8/20/07, Nicky Sandhu <ni...@hotmail.com> wrote:
>
> The usecase is like this
> Transfer the file and put it into some queue.
> from("sftp://someserver/somedir/somefile").to("queue:somequeue");
>
> Then delete it from the server if and only if the above is successful and
> not if it fails.
>
> How can the above be accomplished?

I've raised a JIRA to track this; hopefully we can add a hook so
file/ftp style components can add a 'delete on successful process'
hook.
https://issues.apache.org/activemq/browse/CAMEL-123

We might also want to look at reusing the file components
FileProcessStrategy to handle different kinds of 'delete' (e.g. using
a lock file, deleting or moving etc)
https://issues.apache.org/activemq/browse/CAMEL-124

-- 
James
-------
http://macstrac.blogspot.com/