Skip to content

Instantly share code, notes, and snippets.

@sachin-handiekar
Created August 26, 2013 15:28
Show Gist options
  • Save sachin-handiekar/6342719 to your computer and use it in GitHub Desktop.
Save sachin-handiekar/6342719 to your computer and use it in GitHub Desktop.
Camel-file route
package uk.co.blogspot.camelbyexample;
import org.apache.camel.builder.RouteBuilder;
public class FileXPathBuilder extends RouteBuilder {
public void configure() {
from("file:src/data?noop=true")
.choice()
.when(xpath("/person/city = 'London'"))
.log("UK message")
.to("file:target/messages/uk")
.otherwise()
.log("Other message")
.to("file:target/messages/others");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment