camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwijngaa <>
Subject Recommended practices for dynamically creating and removing camel routes and camel contexts
Date Fri, 25 Sep 2015 14:47:07 GMT

I have a program which creates Camel routes dynamically based on one or more
route xml files in a folder. You can also specify a context, which then will
lead to the route created in that specified camel context.

Basically this:
    CamelContext camelContext = new SpringCamelContext(applicationContext);
    ((SpringCamelContext) camelContext).setName(theContextName);
    // add same components to this new context that were also present in
default camel context

When the route xml file is removed, i do a camelContext.stopRoute(routeId)
and a camelContext.removeRoute(routeId). If it was the last route in the
camel context i also do
a camelContext.stop().

The problem is: sometimes when i remove a route xml and the re-add it, it is
not created / visible in the cli / hawtio. I guess i'm missing something.
*So my question is: are there any recommended practices for dynamically
creating and removing camel routes and or camel contexts.*


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message