Hi Claus Ibsen,

According to you, the codes should be to("idempotentConsumer ...").to("direct:c 
").to("direct:d ");

However, I want to("idempotentConsumer ...").to("direct:c ").end().to("direct:d 
");

It seems there are different understandings in load balancer component.

Thanks
Xiaopeng Li
-----邮件原件-----
发件人: Claus Ibsen [mailto:claus.ib...@gmail.com] 
发送时间: 2011年8月29日 16:49
收件人: users@camel.apache.org
主题: Re: Problem when using Camel Load Balancer

On Mon, Aug 29, 2011 at 10:39 AM, XiaoPeng Li <x...@talend.com> wrote:
> Hi
>
> Here is a piece of CamelContext Spring XML:
>
>        <route>
>            <from uri=""/>
>            <loadBalance>
>                <random/>
>                 <to uri="direct:a"/>
>                <idempotentConsumer messageIdRepositoryRef="idemRepo1">
>                    <xpath>${'sss'}</xpath>
>                    <to uri="direct:c"/>
>                </idempotentConsumer>
>                <to uri="direct:d"/>
>            </loadBalance>
>            <to uri="mock:result"/>
>        </route>
>
> I got a problem in load balancer, about the relationship of endpoint 
> "idempotentConsumer" and "direct:d". "direct:d" should be a child of load 
> balancer. What should I do if I want "direct:d" to be a next endpoint of 
> "idempotentConsumer", which is not a child endpoint of load balancer?
>

Put it inside <idempotentConsumer>

                <idempotentConsumer messageIdRepositoryRef="idemRepo1">
                    <xpath>${'sss'}</xpath>
                    <to uri="direct:c"/>
                    <to uri="direct:d"/>
                </idempotentConsumer>


> It seems Camel cannot support this, is it a bug? All the first level 
> endpoints under load balancer are the child endpoint of the load balancer....
>
> Thanks
>
> Xiaopeng Li
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to