[ 
https://issues.apache.org/jira/browse/CAMEL-9511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15128204#comment-15128204
 ] 

Akitoshi Yoshida commented on CAMEL-9511:
-----------------------------------------

I think the basic idea to offer this option would be to add a cloning option 
operation to KafkaConfiguration so that we can assign a cloned configuration to 
the endpoint and update that local configuration with the additional params so 
that they are correctly merged.

If that is what is requested and there is no objection, I can update the code 
that way.
regards, aki



> Setting Kafka's endpoint configuration by reference overrides everything 
> instead of merging
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-9511
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9511
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-kafka
>            Reporter: Serge Smertin
>            Priority: Minor
>
> If we set configuration for Kafka endpoint as reference, the actual resulting 
> configuration for endpoint is not merged and some query param-set properties 
> are lost. It's easier to use shared configuration in cases us having global 
> bean with zookeeper configuration and broker list.
> {code}
>     @UriParam
>     private KafkaConfiguration configuration = new KafkaConfiguration();
> ...
>     @Override
>     protected KafkaEndpoint createEndpoint(String uri,
>                                            String remaining,
>                                            Map<String, Object> params) throws 
> Exception {
>         KafkaEndpoint endpoint = new KafkaEndpoint(uri, this);
>         String brokers = remaining.split("\\?")[0];
>         if (brokers != null) {
>             endpoint.getConfiguration().setBrokers(brokers);
>         }
>         setProperties(endpoint, params);
>         return endpoint;
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to