camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
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 <akarpe@fusesource.com> 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",
"zzzz").to("blah");


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)
> http://fusesource.com
>
> Blog: http://opensourceknowledge.blogspot.com
> ---------------------------------------------------------
> --
> View this message in context: http://camel.465427.n5.nabble.com/Removing-routes-programmatically-tp4556741p4557011.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message