camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Possibility of using inOut
Date Tue, 31 Aug 2010 12:05:26 GMT
Muhammad Ichsan wrote:
> Dear All
> 
> I want to know if this is possible
> 
> <route>
> <from uri="direct:begining" />
> <inOut uri="activemq:input?replyTo=output" />
> <to uri="file:///tmp/result.txt" />
> </route>
> 
> <route>
> <from uri="activemq:input" />
> <to uri="bean:communicator?method=justSendNoWait" />
> </route>
> 
> <route>
> <from uri="bean:communicator?method=readResponse" />
> <to uri="activemq:output" />
> </route>
> 
> How to implement communicator then?
> 
> Thanks
> 
As the <from uri="bean;communicator?method=readResponse"> can't work for 
you, I think you can define the routes like this, the bean:communication 
need to make sure it sets a right correlationId message header.

<route>
    <from uri="direct:begining" />
    <to uri="activemq:input?replyTo=output" />
    <to uri="file:///tmp/result.txt" />
  </route>

  <route>
    <from uri="activemq:input" />
    <to uri="bean:communicator?method=sendRequestAndGetResponse" />
    <to uri="activemq:output" />
  </route>

Willem

Mime
View raw message