You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by deepak_a <an...@gmail.com> on 2013/09/30 10:13:33 UTC

Camel sFTP how to track processed files?

Hi All,

As per
http://camel.apache.org/ftp2.html

"The FTP consumer will by default leave the consumed files untouched on the
remote FTP server. You have to configure it explicitly if you want it to
delete the files or move them to another location. For example you can use
delete=true to delete the files, or use move=.done to move the files into a
hidden done sub directory"

In my use-case, I don't have privileges to delete/move files in the FTP
Server (since I have limited access).

So how can I determine the files already have already been "fetched" if my
camel routes restart for some reason?

Should I use a database table to record the processed file(s)?

regards
D
 



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-sFTP-how-to-track-processed-files-tp5740461.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel sFTP how to track processed files?

Posted by deepak_a <an...@gmail.com>.
Hi Claus,

Found the answer

I will be using JdbcMessageIdRepository  or JpaMessageIdRepository.
Will prefer JpaMessageIdRepository in my case.


regards
D




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-sFTP-how-to-track-processed-files-tp5740461p5740471.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel sFTP how to track processed files?

Posted by deepak_a <an...@gmail.com>.
Thanks Claus!
Looks like that's exactly what I may need.

But what does it mean by repository here?
"Camel will add the message id eagerly to the repository to detect
duplication"

Ans also does this hold good even when the Came RouteContext is recreated.
i.e. camel is bounced and routes are recreated.


regards
D



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-sFTP-how-to-track-processed-files-tp5740461p5740467.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel sFTP how to track processed files?

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

See the idempotent consumer option on the component.

On Mon, Sep 30, 2013 at 10:13 AM, deepak_a <an...@gmail.com> wrote:
> Hi All,
>
> As per
> http://camel.apache.org/ftp2.html
>
> "The FTP consumer will by default leave the consumed files untouched on the
> remote FTP server. You have to configure it explicitly if you want it to
> delete the files or move them to another location. For example you can use
> delete=true to delete the files, or use move=.done to move the files into a
> hidden done sub directory"
>
> In my use-case, I don't have privileges to delete/move files in the FTP
> Server (since I have limited access).
>
> So how can I determine the files already have already been "fetched" if my
> camel routes restart for some reason?
>
> Should I use a database table to record the processed file(s)?
>
> regards
> D
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-sFTP-how-to-track-processed-files-tp5740461.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen