Luca Burgazzoli created CAMEL-14600:
---------------------------------------

             Summary: Auto configure component/dataformat/languages when they 
are initialized
                 Key: CAMEL-14600
                 URL: https://issues.apache.org/jira/browse/CAMEL-14600
             Project: Camel
          Issue Type: New Feature
          Components: camel-core
            Reporter: Luca Burgazzoli
             Fix For: 3.2.0


As today the auto configuration of components is delegated to the runtime so as 
example, spring-boot auto configure components with the help of some 
CamelXYZAutoConfiguration classes, whereas the camel-main scans properties for 
those that starts with camel.component and configure the related components.

I wonder if we can have a single point where component, dataformat, language & 
co auto-configuration take place regardless of the runtime camel runs on.

As example for components, the auto configuration could happen when they are 
initialized like:
- search for component-configurer (it is done already)
- use the component-configurer - if any - to initialize the component 

The component-configurer generator could also be enhanced not only to apply 
given properties but also to look them up from the camel context with a method 
like:

{code:java}
    public boolean configure(CamelContext camelContext, String componentName);
{code}
    
The advantage of such implementation would be that:
- component are consistent configured across runtimes (i.e. at the moment 
spring boot starters have an option to provide customizers to let use tune 
component configurations)
- with auto generated code we could reduce the need to create intermediate 
objects on camel-main







--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to