camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Removing routes programmatically
Date Thu, 07 Jul 2011 05:34:36 GMT
On Wed, Jul 6, 2011 at 4:58 PM, Ashwin Karpe <> wrote:
> Hi,
> You are right. The stopRoute() is responsible for stopping the route from
> the Camel Context.
> The removeRoute() however stops the RouteService associated with the route.
> Since the RouteService is associated with a collection of routes, performing
> this operation has an unintended consequence of shutting down the
> RouteServices and removing of other routes managed by the RouteService...

The RouteService may seem to have a collection but in reality there
should only be 1 route in there.
That was just how the API back in the days was crafted. The
RouteService may have multuple routes in situations where the route
has multiple inputs.

Daniels does any of your routes have 2+ inputs? eg from("xxx", "yyyy",

What springs to my mind is that stopping a route re-uses the shutdown
strategy to graceful shutdown the route (to avoid loosing inflight
messages etc.). And there may be a side effect of that service to stop
other consumers/routes.

But we need a re-producable test. That helps a lot :)

> This is a bug or at the least an incorrectly named API. I will raise this as
> a bug.
> Watch for the Jira link in my following note.
> Cheers,
> Ashwin...
> -----
> ---------------------------------------------------------
> Ashwin Karpe
> Apache Camel Committer & Sr Principal Consultant
> FUSESource (a Progress Software Corporation subsidiary)
> Blog:
> ---------------------------------------------------------
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message