Hi

Yes implement your own sorter, see the sorter option
http://camel.apache.org/file2

On Thu, Jan 28, 2016 at 7:17 AM, David Hoffer <dhoff...@gmail.com> wrote:
> I have a route that receives several different file types and the names
> vary too but always contain a timestamp.  I need to process these
> in timestamp order and planned to use sortBy=file:name, this worked fine in
> testing but now that we are closer to production we are finding that the
> file names often contain extra leading characters in addition to the the
> timestamp, e.g
>
> 500432.[timestamp].dat
>
> Since the leading 6 characters are random and completely unrelated to the
> timestamp it completely throws off the sortBy=file:name approach.
>
> Is there a way I can specify custom rules to use to determine what Camel
> should use when doing the sort?  The rules would have to be per file type
> as the name structure varies by type.
>
> Is anything like this possible?  Any workarounds?
>
> -Dave



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

Reply via email to