camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Serge Smertin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-9511) Setting Kafka's endpoint configuration by reference overrides everything instead of merging
Date Wed, 13 Jan 2016 11:09:39 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-9511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Serge Smertin updated CAMEL-9511:
---------------------------------
    Description: 
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}

  was:
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.

{quote}
    @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;
    }
{quote}


> 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: Bug
>          Components: camel-kafka
>            Reporter: Serge Smertin
>              Labels: kafka, kafka-0.8
>             Fix For: 2.16.2
>
>
> 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)

Mime
View raw message