I have a route and a routeConfiguration. I want to remove both from the
CamelContext.

I tried it like this:

String routeId = route.getId();
String routeConfigurationId = route.getConfigurationId();

//remove route
routeController.stopRoute(routeId, 30, TimeUnit.SECONDS);
context.removeRoute(routeId);

//remove routeConfiguration routeController.stopRoute(routeConfigurationId,
30, TimeUnit.SECONDS);
context.removeRoute(routeConfigurationId);

The route is removed and there are no errors. However, when I load the
route later again it says:

"Route configuration already exists with id: 1234"

The remove probably didn't work. There are no other routes using this
configuration.

How to properly remove the routeConfiguration?

Note: I use Camel 3.20.7
Note 2: When I do

context.getRoutesSize();

Before removal I get 1 and after removal I get 0.

Note 3: On the CamelContext (context) there is:

context.addRoutesConfigurations();

But there are no methods like getRoutesConfigurations or
removeRouteConfiguration(routeId);

Kind regards,

Raymond

Reply via email to