Hi,
I don't think Camel support to add and remove the endpoints of the
LoadBalancer as you want in the runtime.
But the now camel route can be start and stop in the runtime. maybe you
can consider to stop the route, change the route and start it again.
Please create a JIRA if you cannot work around it with my suggestion.
Willem
On 12/23/10 5:25 AM, serega wrote:
Hi.
I can easily create a route using Java DSL of the form
from("foo").loadBalance().to("bar").("bla"),
which is perfect for static routes.
How can I do the same but without DSL. Something like
CamelContext context = new DefaultCamelContext();.
LoadBalancer balancer = new RoundRobinLoadBalancer();
balancer.addEndpoint("bar");
balancer.addEndpoint("bla");
....
balancer.removeEndpoint("bar")
I need to be able to add/remove endpoints to/from load balancers at runtime.
Is it possible with Camel?
Sergey.
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang