ValidatePage added by Christian MuellerValidateAvailable as of Camel 2.3 Validate can be used to validate a message. Imagine you consume text files and before processing each file you want to be sure the content is valid. You can use the validate DSL with all kind of Predicates and Expressions. Validate will just evaluated the Predicate/_expression_ and if its false an PredicateValidationException is thrown. Using from Java DSLIn the route below it will read the file content and validate it against a regular _expression_. from("file://inbox") .validate(body(String.class).regex("^\\w{10}\\,\\d{2}\\,\\w{24}$")) .to("bean:MyServiceBean.processLine");
Change Notification Preferences
View Online
|
Add Comment
|
- [CONF] Apache Camel > Validate confluence
- [CONF] Apache Camel > Validate confluence