Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.14.1
-
None
-
Unknown
Description
See discussion:
Most users in both Spring Booth and CDI environments probably rely on auto-discovery of routes, so duplicate route identifiers are a common mistake and should be detected. For this to work, routes have to be added before the CamelContext is started.
This affects both Spring Boot and CDI integration, where the routes are added after CamelContext start, which results in replacement of duplicates without error.
The CDI integration code is actually worse than the Spring Boot code, since users have no chance of customizing the CamelContext with a CamelContextConfiguration. In the Spring Boot integration there is at least that option available to access the CamelContext after it has started, although that still doesn't give you access to the important configuration options such as ManagementStrategy.
I recommend in both Spring Boot and CDI integration to share a (new?) CamelContextConfiguration interface with methods beforeContextStart(CamelContxt ctx) and afterContextStart(CamelContext ctx). Instances of that type should be auto-discovered so the user has a chance to edit the CamelContext.
Attachments
Issue Links
- requires
-
CAMEL-9201 Improved Camel CDI component
- Resolved