camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bbuzzard <>
Subject Trying to consume files with a special filename extension
Date Tue, 20 Apr 2010 17:34:32 GMT

I have a drop folder that contains files with many different extensions.  I
would like to route files with a particular extension into a queue.  It
looks like the parameter "include" does exactly what I want, but I'm having
trouble specifying any regex that will work.  

In my test example I created three files: test1.txt, test2.log and
test3.txt.  My drop folder is "c:\aaa".  I specified the route in the
webapps\camel\WEB-INF\applicationContext.xml file and it looks like this:
<route id="Good Route">
  <from uri="file://c:\\aaa?include=test2.log"/>
  <to uri="activemq:testq"/>
When I copy the three files into the drop folder with the "Good Route" the
test2.log file is moved to the queue.  But when I modify the "Good Route" to
look like the following it does not work.
<route id="Bad Route">
  <from uri="file://c:\\aaa?include=.+.log"/>
  <to uri="activemq:testq"/>

I tested the expression ".+.log" in a simple JAVA program and it worked, so
I'm guessing that I didn't correctly specify the include parameter in the
route xml.  Would someone press tell me the correct way.

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

View raw message