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

Topic is not set if a KafkaConfiguration is used

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.7.3, 3.10.0
    • Fix Version/s: 3.11.0
    • Component/s: camel-kafka
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      If a KafkaConfiguration is used (see code) and no topic is defined in the configuration, the parameter from the URI is not taken over, but a null value is set.
      This leads to a consumer not having a valid topic name, but null being provided as a value.

      It looks like setProperties(endpoint, parameters); overrites the topic.

      KafkaConfiguration

      @Bean
      public KafkaConfiguration kafkaConfig() {
           KafkaConfiguration kafkaConfiguration = new KafkaConfiguration();
           kafkaConfiguration.setBrokers(..);
           kafkaConfiguration.setClientId(..);
           //kafkaConfiguration.setTopic(kafkaTopic);
      return kafkaConfiguration ;
      

      Route

      from(kafka({{topic.name}}?configuration=#kafkaConfig"))
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                FloEc Florian Eckhard
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: