camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Route Question
Date Wed, 06 Apr 2011 14:27:30 GMT
On Wed, Apr 6, 2011 at 4:24 PM, jpalmer1026 <> wrote:
> Hi Claus,
> Thanks for the information. This is getting me a little closer but it still
> doesn't solve my particular use case. What I'm actually trying to do is
> route files based on filename. The filenames will be read in from an
> external file upon the launch of the app and this filename list will then be
> used to conditionally route the files. For example, if the initial list of
> filenames that was read in is test10.txt, test20.txt and test30.txt, then
> the filter would need to route any files with any of those filenames to one
> directory and all other files to a different directory.
> Does that make sense? Is there a way to do this with Camel?

Just implement a custom filter class and configure it on the endpoint


<bean id="myFilter" class="...MyFilterBean">

And then implement the interface
org.apache.camel.component.file.GenericFileFilter in MyFilterBean.
And return true|false to accept the file or not.

> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
CamelOne 2011:
Twitter: davsclaus
Author of Camel in Action:

View raw message