You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jamesburn <Ja...@oup.com> on 2015/12/11 12:47:48 UTC

Camel file/ftp only collect file when it has delete permissions.

Hi

We're polling a remote ftp server. I want camel to only collect a file when
it knows it can delete the file (and move to another location on the ftp
server). If we don't have write permission for a file I don't want SM to
keep on trying to process it.

Here's what I have to start:

<from
uri="ftp:{{pickup.ftp.connection}}&amp;delete=true&amp;include=.*.xml&amp;maxMessagesPerPoll=1&amp;recursive=false&amp;delay=18000"/>

Any thoughts?

James




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-file-ftp-only-collect-file-when-it-has-delete-permissions-tp5774990.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel file/ftp only collect file when it has delete permissions.

Posted by Claus Ibsen <cl...@gmail.com>.
Try writing a custom filter in java code, and from the file instance
you can grab various file details. Hopefully there is something about
the file permissions you can use to know.

You get these details
https://github.com/apache/camel/blob/master/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java#L218

Maybe on that FTPFile you can find more details.



On Fri, Dec 11, 2015 at 12:47 PM, jamesburn <Ja...@oup.com> wrote:
> Hi
>
> We're polling a remote ftp server. I want camel to only collect a file when
> it knows it can delete the file (and move to another location on the ftp
> server). If we don't have write permission for a file I don't want SM to
> keep on trying to process it.
>
> Here's what I have to start:
>
> <from
> uri="ftp:{{pickup.ftp.connection}}&amp;delete=true&amp;include=.*.xml&amp;maxMessagesPerPoll=1&amp;recursive=false&amp;delay=18000"/>
>
> Any thoughts?
>
> James
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-file-ftp-only-collect-file-when-it-has-delete-permissions-tp5774990.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2