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
[email protected]<mailto:[email protected]> |
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]