Just to extend your idea ...

We could do something like.

LoadBalancingStrategy myStrategy;  // my own strategy to choose an endpoint

from(endpointA).loadBalance(myStrategy).to(Endpoint1, Endpoint2, ...);

or if can use an out of the box strategy like:

from(endpointA).roundRobinLoadBalance().to(endpoint1, endpoint2, ...);

On Nov 8, 2007 1:59 PM, Ning Jiang <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I just jump into writing some demos which could show how to use camel
> as a load balancer.
> I can find there are lots of balancer processor in the camel-core module.
> But when I went through the code , I just found there is no DSL
> balancer type class to handle the load balancer setting up stuff and
> no test code to show how to use them in a program way.
>
> Here is my proposal for the LoaderBalancer DSL support.
> The DSL could be
> form(EndpointA).loaderBalancer("RoundRobin").to("EndpointB").to("EndpointC").to("EndponitD");
>
> or
>
> form(EndpointA).loaderBalancer("Random").addEndpoint("EndpointB").addEndpoint("EndpointC").addEndpoint("EndponitD");
>
>
> Any thought?
>
> Willem.
>

Reply via email to