Hi, You can set the id on the RouteDefinition just like this <route id="route1"> </route> And use this ID to access the RouteDefinition from the CamelContext.
And this thread[1] will help you if you are using the DSL to define the route.
[1]http://old.nabble.com/start-stop-routes-programmatically-ts26781725.html#a26781725 Willem Ricardo Melo wrote:
Hi, I'm new to camel API and I need to update or remove camel routes that have been created. I've found in an example that to find current routes, I need to use the code: List<RouteDefinition> routes = camelContext.getRouteDefinitions(); I can iterate through the routes definition, however how can I see the "to" (destination) endpoint of a route definition, to update or remove the route I'm looking for? Where is it? Thanks in advance!
