You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Bob Jolliffe <bo...@gmail.com> on 2013/11/05 16:54:22 UTC

Join after a split

Hi

I have a route which takes a database query result set, splits it by row,
then proceses each row using another  route with seda endpoint.  Something
like:

<route id="synch-rm" autoStartup="true">
      <description>Get updates from dhis db and post to
registry</description>
      <to uri="sql:{{hmisdb.selectOus}}?dataSource=#dhisdb"/>

      <!-- process rows concurrently -->
      <split>
        <simple>${in.body}</simple>
        <to uri="seda:newFacility"/>
      </split>
   <log message="Done"/>
</route>

Is there I can cause the main thread in this route to wait until all the
seda:newFacility routes are complete before getting to the log message?

Bob

Re: Join after a split

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

See this EIP
http://camel.apache.org/composed-message-processor.html

about _only using a splitter_

On Tue, Nov 5, 2013 at 4:54 PM, Bob Jolliffe <bo...@gmail.com> wrote:
> Hi
>
> I have a route which takes a database query result set, splits it by row,
> then proceses each row using another  route with seda endpoint.  Something
> like:
>
> <route id="synch-rm" autoStartup="true">
>       <description>Get updates from dhis db and post to
> registry</description>
>       <to uri="sql:{{hmisdb.selectOus}}?dataSource=#dhisdb"/>
>
>       <!-- process rows concurrently -->
>       <split>
>         <simple>${in.body}</simple>
>         <to uri="seda:newFacility"/>
>       </split>
>    <log message="Done"/>
> </route>
>
> Is there I can cause the main thread in this route to wait until all the
> seda:newFacility routes are complete before getting to the log message?
>
> Bob



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen