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 work, but it appears that
the CamelFileLastModified header is a long and I do not know how to use to
compare it with a date.

public void configure() throws Exception {
DateTime date = new DateTime();
 from("file:{{file.inbox}}?delete=true")
.filter(header("CamelFileLastModified").isLessThan(date.minusDays(30)))
 .process(new FileProcessor());
}

I would appreciate any help you can provide,

Karim

Reply via email to