I have created a ticket to make this easier using the ConsumerTemplate API https://issues.apache.org/jira/browse/CAMEL-3427
Check the source code in trunk, how to do it in your Camel version. On Tue, Dec 14, 2010 at 4:39 PM, Andreas A. <andreasasm...@gmail.com> wrote: > > Can't find anything along those lines. I tried doing > > while(true) { > Exchange ex = consumer.receive(ftpsUri, 5000); > if(ex != null) { > logger.info("Fetching file: " + > ex.getIn().getHeader("CamelFileName")); > producer.send(fileUri, ex); > ex.getUnitOfWork().done(ex); > } > else if (ex == null) { > consumer.stop(); > break; > } > } > > But this just throws nullpointer, I suppose the exchange doesn't have a unit > of work. > -- > View this message in context: > http://camel.465427.n5.nabble.com/Using-ConsumerTemplate-to-fetch-files-tp3304671p3304768.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/