Re: Use MessageFilter to process files that are 30 or more days old

2013-07-31 Thread Christian Müller
Add some logging statements to figure out what the actual values are... Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/m

Re: Use MessageFilter to process files that are 30 or more days old

2013-07-30 Thread Karim Garza
Thank you for your reply. I tried using the EIP filter and I could not get it to work even after comparing milliseconds to milliseconds. I then tried Christian's suggestion and it work as expected. My route ended up as @Override public void configure() throws Exception { from("file:{{file.inbox}}?

Re: Use MessageFilter to process files that are 30 or more days old

2013-07-29 Thread Christian Müller
Use the file component option "filter" [1], not the filter EIP. Implement the org.apache.camel.component.file.GenericFileFilter class. Create a new Calendar instance, subtract 30 days and take the time in millis. If it's higher than the "CamelFileLastModified" header value, return true. Otherwise,

Re: Use MessageFilter to process files that are 30 or more days old

2013-07-29 Thread John D. Ament
Karim, Did you try date.minusDays(30).getMillis()? Typically long formats for dates/times are in milliseconds. On Mon, Jul 29, 2013 at 4:45 PM, Karim Garza wrote: > Hi, > > I am trying to use the MessageFilter to process files that are 30 days or > older. I came up with this code to do the wor