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: Loadbalancer for consuming?
Date Sat, 09 Oct 2010 03:27:10 GMT
On 10/8/10 2:36 AM, tide08 wrote:
>
> Not sure if it make sense to use loadbalancer in such context but I need to
> consume message from external system which has multiple nodes i.e. multiple
> uri's to consume from. I was wondering if camel loadbalancer can be used in
> such context.
>
> <camel:route>
>     <camel:loadBalance>
>         <camel:roundRobin/>
>         <camel:from uri="someuri:1"/>
>         <camel:from uri="someuri:2"/>
>         <camel:from uri="someuri:3"/>
>     </camel:loadBalance>
>     <camel:to uri="mock:dead" />
> </camel:route>
>
> But it looks like I cannot use "from" within loadbalancer tags? Or is there
> a way to accomplish this?
>
> Thanks!

How about ?

<camel:route>
   <camel:from uri="someuri:1"/>
   <camel:to uri="seda:backend" />
</camel:route>
<camel:route>
   <camel:from uri="someuri:2"/>
   <camel:to uri="seda:backend" />
</camel:route>
<camel:route>
   <camel:from uri="someuri:3"/>
   <camel:to uri="sead:backend" />
</camel:route>
<camel:route>
   <camel:from uri="seda:backend"/>
   <camel:loadBalance>
       ... your real service access point
   </camel:loadBalance>
<camel:route>

-- 
Willem
----------------------------------
Open Source Integration: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: http://twitter.com/willemjiang

Mime
View raw message