You can use the aggregator eip pattern
http://camel.apache.org/aggregator2

On Fri, Oct 18, 2013 at 5:48 PM, bonnahu <[email protected]> wrote:
> Hi all, I have two routes here which are connected by using direct.
> Currently, when reading one file from file:src/test/resources/orders, it
> will go to processRoute. However, what I want to do is to read all the files
> in the file:src/test/resources/orders first, then go to the route
> processRoute. Is there a way to do it? thanks!
>
> <route id="readFilesRoute" autoStartup="true" startupOrder="200">
>      <from
> uri="file:src/test/resources/orders?noop=true&amp;initialDelay=0"/>
>      .....
>      <to uri="direct:precessOrders"/>
> </route>
>
> <route id="processRoute" startupOrder="100">
>      <from uri="direct:precessOrders"/>
>      <to uri="precessOrdersProcessor"/>
> </route>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Connecting-two-routes-using-direct-tp5741850.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to