You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Florian Eckhard (Jira)" <ji...@apache.org> on 2021/06/09 21:54:00 UTC

[jira] [Created] (CAMEL-16701) Topic is not set if a KafkaConfiguration is used

Florian Eckhard created CAMEL-16701:
---------------------------------------

             Summary: Topic is not set if a KafkaConfiguration is used
                 Key: CAMEL-16701
                 URL: https://issues.apache.org/jira/browse/CAMEL-16701
             Project: Camel
          Issue Type: Bug
          Components: camel-kafka
    Affects Versions: 3.10.0, 3.7.3
            Reporter: Florian Eckhard


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.

KafkaConfiguration
{code:java}
@Bean
public KafkaConfiguration kafkaConfig() {
     KafkaConfiguration kafkaConfiguration = new KafkaConfiguration();
     kafkaConfiguration.setBrokers(..);
     kafkaConfiguration.setClientId(..);
     //kafkaConfiguration.setTopic(kafkaTopic);
return kafkaConfiguration ;
{code}
Route
{code:java}
from(kafka({{topic.name}}?configuration=#kafkaConfig"))
{code}



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