On Fri, Jan 25, 2013 at 3:38 PM, renamsavio <renamsav...@gmail.com> wrote: > Does someone have any idea how to solve it? >
You can use the API on CamelContext to start|stop routes. So you would need to figure out when there is no more files on route1, to start route2, and so forth. And what should happen when route 3 is done. Should it start route1. So it goes in round robin? You can enable the sendEmptyMessageWhenIdle=true, which will have an empty message being sent out in the route. Then you can use that to know that there is no more file, and then start the next route http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html In Camel 2.11 it may be a bit easier with the control bus eip http://camel.apache.org/controlbus.html You can also use on completion http://camel.apache.org/oncompletion.html That may be easier. The file consumer is batch consumer, so there is a special header that tells when the batch is done = no more files. Then in the on consumer you can filter on that, and react upon stopping current route, and start next. > Thanks! > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/File-component-run-them-sequentially-tp5726185p5726264.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen