Thank you very much, it works with pollEnrich.

 from("timer://myTimer?period=1000") 
  .pollEnrich("file:target/in",
      new AggregationStrategy() {
        public Exchange aggregate(Exchange oldExchange, Exchange
newExchange) {
          if (newExchange == null) return oldExchange;
          String myId = newExchange.getIn().getBody(String.class);
          oldExchange.getIn().setBody(myId);
          return oldExchange;
        }   
     })
  .to("sql:select * from test where id = #") 
  .marshal().csv()
  .to("file:target/out");
  



--
View this message in context: 
http://camel.465427.n5.nabble.com/passing-data-to-a-polling-consumer-tp5740313p5740392.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to