camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: read file, read content and then read another file or exit
Date Fri, 17 Apr 2015 16:24:45 GMT
Hi

You can implement a custom file filter class and then implement the
logic to return true | false to accept the file depending on the
sequence number.

See about filter option at
http://camel.apache.org/file2

On Fri, Apr 17, 2015 at 5:01 PM, erik_romson <erik@zenior.no> wrote:
> Hi
> I'm new to camel and can't understand how to solve the following.
>
> There is a ftp server that generates data each day. It places one or more
> files in a folder
>
> day 1:
> file0.xml (has seqnr 0)
>
> day2:
> file0.xml (has seqnr 2)
> file-1.xml (has seqnr 1)
> file-2.xml (has seqnr 0, same as file0.xml from day 0)
>
> etc
>
> 1: i have a sequence number n
> 2: each day, I'll read a file called file0.xml  and read a sequence number
> in it (just a string)
> 3: if this day's sequence number (m) is m > n+1, I have to read a file
> called file-1.xml
> 4: reapeat 3 until m=n+1
>
> basically:
>
>
> I'm a bit stuck with this recursiveness of this. Any solution to this would
> be very welcome
>
> /sear
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/read-file-read-content-and-then-read-another-file-or-exit-tp5765969.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
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message