Hi, I would suggest to split the route in smaller route using direct and then check
from(FILE_WATCHER_DSL) .log(LoggingLevel.INFO, FileWatchDSLUtil.getFileLogPattern()) .choice() .when(checckFilePattern(header("CamelFileAbsolutePath").toString())) .to(direct:process) .otherwise() .to(direct:processOtherwise) place the logic in respective direct endpoints. -- View this message in context: http://camel.465427.n5.nabble.com/Content-Based-Router-Java-DSL-is-not-working-tp5767440p5767443.html Sent from the Camel - Users mailing list archive at Nabble.com.