On Fri, 05 Nov 2010 14:54:22 +0800, Willem Jiang
<[email protected]> wrote:
> I just checked the code of Camel there is a big difference between
> the inOut("jms:xmlOrders") and
> to("jms:xmlOrders?exchangePattern=InOut")
> 
> inOut("jms:xmlOrders") will set the exchange pattern of the exchange
> to be InOut, and send the exchange to the endpoint.
> to("jms:xmlOrders?exchangePattern=InOut") will just send the exchange
> to the endpoint, it will not change the exchange pattern of the
> exchange. The exchangePattern only takes effect on the jms endpoint
> consumer when it creates the Exchange.
> 
> The issue of your first route is bean(ValidatorBean.class,
> "validate") will set the exchange pattern to InOut, and jms:valid
> endpoint will expect the response from the "stream:out" endpoint which
> will block the message which need to send back to "jms:xmlOrders".
> 
> Remove the bean() part can remove the block, so you can get what you need.
> 

Thanks a lot for the explanation !
-- 
Bruno Dusausoy
YP5 Software
--
Pensez environnement : limitez l'impression de ce mail.
Please don't print this e-mail unless you really need to.

Reply via email to