Created
August 26, 2013 15:28
-
-
Save sachin-handiekar/6342719 to your computer and use it in GitHub Desktop.
Camel-file route
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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