Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9511

Setting Kafka's endpoint configuration by reference overrides everything instead of merging

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.16.3, 2.17.0
    • Component/s: camel-kafka
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      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.

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

        Attachments

          Activity

            People

            • Assignee:
              ay Akitoshi Yoshida
              Reporter:
              nfx Serge Smertin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: