camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Hoffer <>
Subject Custom sorting using the file component
Date Thu, 28 Jan 2016 06:17:51 GMT
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


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?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message