Best way to load dynamically routes in Apache Camel

后端 未结 3 621
渐次进展
渐次进展 2021-01-13 04:41

we have developped application based on Karaf and Apache Camel. While our application is entirely based on bundles ( OSGI ) we are also loading the Camel context ( and its\'

3条回答
  •  耶瑟儿~
    2021-01-13 05:27

    I think a good approach is to group your routes into small contexts with just a few (or maybe even single) routes per context. Then you reload that small context without causing interruption in other routes.

    However, as you don't believe in that approach, you can easily add and remove routes with methods on the CamelContext. Create a route builder that constructs routes from your database and use addRoutes and removeRoute.

提交回复
热议问题