Thursday, December 8, 2016

Apache Camel and YAML processing example

I had trouble finding a full example of how to process YAML files using Apache Camel. So here's an example I've written:

               .process(new Processor() {  
                 void process(Exchange exchange) throws Exception {  
                   String filename = exchange.getIn().getHeader("CamelFileName")  
         "registerDataset: "+filename)  
                   def yamlObj = exchange.getIn().body  
               .log("Bad registration file: "+header("CamelFileName"))  


No comments:

Post a Comment