Add DSL support for LoadBalance
--------------------------------
Key: CAMEL-215
URL: https://issues.apache.org/activemq/browse/CAMEL-215
Project: Apache Camel
Issue Type: New Feature
Components: camel-core
Reporter: Willem Jiang
Fix For: 1.3.0
LoadBalancingProcessor myStrategy; // my own strategy to choose an endpoint
from(endpointA).loadBalance().setLoadBalance(myStrategy).to(Endpoint1,
Endpoint2, ...);
or if can use an out of the box strategy like:
from(endpointA).loadBalance().roundRobin(),to(endpoint1, endpoint2, ...);
Just a minor twist on that idea; how about
from(endpointA).loadBalance().roundRobin().endpoints().<someExpression>
where loadBalance() returns a LoadBalanceClause rather like filter()
returns an ExpressionClause which lets folks pick the strategy of load
balancer to use.
Using a named reference could be by
from(endpointA).loadBalance().ref("someName")...
I also added the idea of using an expression to determine the
endpoints to load balance across as we might wanna support dynamic
load balancing. e.g. querying the endpoints in OSGi or JNDI or
whatever.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.