I think Camel already supports it if your routes elements are alway
instace of OutputType.
<camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring";>
    <route>
      <from uri="direct:start"/>
      <to uri="some endpoint1"/>
      <to uri="some endpoint2"/>
      <to uri="some endpoint3"/>
    </route>
  </camelContext>

Camel will use a pipeline to chain these endpoints up, if the message
exchange pattern is InOut, you will get the response which is produced
by the "some endpont3" from "direct:A".

But if your routes configured like this, I don't think camel support this.

<camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring";>
    <route>
      <from uri="direct:start"/>
      <to uri="queue:mid"/>
    </route>
    <route>
      <from uri="queue:mid"/>
      ... some slow endpoint
    </route>
  </camelContext>

Willem


mta38 wrote:
> Hi all,
> 
> Is a way exist when use a DirectEndpoint to force camel wait execution of 
> all routes before send response back to first endpoint ?
> 
> For example if I have the following routes
> 
> <camelContext id="camel" ..>
>       <from uri="direct:A">
>       <to uri="">
>       …
>       N routes
>       
> </camelContext>
> 
> Want camel execute the N routes before send response back to "direct:A".
> Best regards,
> Mta38
> 

Reply via email to