Hi
   I did further investigation and noticed that only below five fields are 
switching values before kafka endpoint is created.
Here is the new values in KafkaConfiguration which it uses

allowManualCommit -> false
sslEndpointAlgorithm -> "https"
securityProtocol -> "PLAINTEXT"
saslMechanism -> GSSAPI"
kerberosPrincipalToLocalRules -> "DEFAULT"

This looks like a bug somewhere in code.

Thanks and Regards,
Hemang Ajmera


From: Ajmera, Hemang C <hemang.ajm...@cgi.com>
Sent: 15 July 2021 20:40
To: users@camel.apache.org
Subject: Springboot creating new Kakfa components

EXTERNAL SENDER: Do not click any links or open any attachments unless you 
trust the sender and know the content is safe.
EXPÉDITEUR EXTERNE: Ne cliquez sur aucun lien et n'ouvrez aucune pièce jointe à 
moins qu'ils ne proviennent d'un expéditeur fiable, ou que vous ayez 
l'assurance que le contenu provient d'une source sûre.


Hi
   I am configuring kafka component using some default values configured via 
springboot configurations. This code works fine for camel 3.4.5, however it is 
not working with camel 3.11.0. I checked the migration documents, but didn't 
find anything significant. When I check the output, kakfa is configured with 
default values and not with what I am providing. Here is the code which is used 
for configuration kafka component

@Configuration
@EnableConfigurationProperties(KafkaComponentProperties.class)
public class KafkaComponentFactory {

    @Autowired(required = false)
    KafkaComponentProperties kafkaProp;

    @Bean("kafka")
    public KafkaComponent createKafkaComponent() throws KafkaException {

        KafkaComponent kafka = new KafkaComponent();
        KafkaConfiguration kafkaConfiguration = new KafkaConfiguration();

        kafkaConfiguration.setSaslMechanism(kafkaProp.getSaslMechanism());
       kafkaConfiguration.setSecurityProtocol(kafkaProp.getSecurityProtocol());
        kafkaConfiguration.setGroupId(kafkaProp.getGroupId());
        kafkaConfiguration.setBrokers(kafkaProp.getBrokers());
        
kafkaConfiguration.setSslTruststorePassword(kafkaProp.getSslTruststorePassword());
        
kafkaConfiguration.setSslKeystorePassword(kafkaProp.getSslKeystorePassword());
        
kafkaConfiguration.setSslTruststoreLocation(kafkaProp.getSslTruststoreLocation());
        
kafkaConfiguration.setSslKeystoreLocation(kafkaProp.getSslKeystoreLocation());
        kafkaConfiguration.setAutoCommitEnable(kafkaProp.getAutoCommitEnable());
        
kafkaConfiguration.setAllowManualCommit(kafkaProp.getAllowManualCommit());
        
kafkaConfiguration.setSslEndpointAlgorithm(kafkaProp.getSslEndpointAlgorithm());

        kafka.setConfiguration(kafkaConfiguration);

        System.setProperty("java.security.auth.login.config", 
kafkaProp.getKafkaClientConfigFilePath());

        return kafka;

    }



Thanks and Regards,
Hemang Ajmera

Hemang C Ajmera | Technical Architect
Asia Pacific Communications, Media and Utilities Delivery Center | CGI
Block 5, DLF-SEZ, Manapakkam, Chennai - 600089, India
O: +91-44-6647-3828 | M: +91-89397-07557 | M: +91-98841-66619 | VOIP: 8083828
hemang.ajm...@cgi.com<mailto:hemang.ajm...@cgi.com> | 
www.cgi.com<http://www.cgi.com/>
[Description: Description: Description: Description: Description: Description: 
Description: C:\Users\rahul.muthalali\AppData\Local\Microsoft\Windows\Temporary 
Internet Files\Content.Word\Top_Employer_India_English_2016.gif]

Reply via email to