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"/>
</route>
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"/>
</route?

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: 
http://old.nabble.com/Trying-to-consume-files-with-a-special-filename-extension-tp28287902p28287902.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.

Reply via email to