Hi All,
I have created a temporary route reading messages from a queue. I created it
programtically by using
camelContext.addRoutes(builder);
camelContext.startRoute(id);
where builder -> is my routebuilder definition
id-> is routeid of the route
I would like stop and remove this route programmatically.
I tried as below
camelContext.stopRoute(id);
RouteDefinition routedefinition = camelContext.getRouteDefinition(id);
//routedefinition.shutdownRoute("Defer");
List<RouteDefinition> list = new ArrayList<RouteDefinition>();
list.add(routedefinition);
camelContext.removeRouteDefinitions(list);
it is stopping the route as expected.
I could see the status from the jconsole as "stopped" . But
removeRouteDefinition is not removing the route from the jconsole. I can see
the route is listed in jconsole.
How can I remove the temporary route programatically that I have created?
Thanks & regards
Gnanda
--
View this message in context:
http://camel.465427.n5.nabble.com/Stopping-and-removing-a-route-programmatically-tp1223859p1223859.html
Sent from the Camel - Users mailing list archive at Nabble.com.