camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gustavo.maurizio" <>
Subject Re: camel 2.18.0 file component filter example
Date Sat, 29 Oct 2016 11:04:50 GMT
Thanks Claus, we figured out how to do it. To provide an example:

To process files in a directory on a specific time and date, we create with
other routes a file whose body has the content of the message to post. Files
should be named as 2016-12-28__01-00-58__UTC@some.queue

The filterFile=${file:name} &lt; ${date:now:yyyy-MM-dd__HH-mm} will choose
all files ready to process.
Note that we use &lt; instead of more familiar < since we cannot use
directly the symbol.

We then split the filename at the @ symbol and chose the second part [1] to
send the message to with dynamic endpoint.

        <route id="gt.cron.queue" streamCache="true" trace="false">
&lt; ${date:now:yyyy-MM-dd__HH-mm}"/>
            <convertBodyTo type="java.lang.String" charset="UTF-8"/>

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

View raw message