camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem jiang <>
Subject Re: Removing an Endpoint from a route
Date Thu, 11 Oct 2012 09:54:07 GMT
Yeah, it's not a good idea to remove the endpoint from the camel context.
There are lots of place in camel can lookup or create a endpoint for send the message.

It could be easier to wrap the bean to let it throw the exception when the bean is not ready
to use.
And then you can use the FailOverLoadBalancer directly without any addition work.

Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: |
Blog: ( (English)
 ( (Chinese)
Twitter: willemjiang 
Weibo: willemjiang

On Thursday, October 11, 2012 at 4:22 AM, alerios wrote:

> Hi Guru, thanks for your reply.
> I think using the failover load balancer is not an option for me, since my
> Bean will not throw an exception when it fails. I want to disable the
> Endpoint when I want, based on health checks, for example. Also, I would
> like to use the weigthed loadbalancer instead, maybe I would have to
> implement my own LoadBalancer class, but then I don't see any value in using
> Camel at all for my escenario.
> I tested the JMX console to stop an endpoint processor, but it happens the
> same as when removing the Endpoint from the Registry:
> Caused by: java.lang.IllegalStateException: SendProcessor has not been
> started: sendTo(Endpoint[bean://tmi3?method=sendResponse])
> I guess camel is not designed to remove endpoints at runtime. Maybe I should
> try removing, and adding the route again, but I'm afraid that could cause a
> race condition because of many threads trying to do the same.
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at (

View raw message