SUPPORT-8413: fix kafka config

This commit is contained in:
gulnaz 2024-09-20 15:54:08 +03:00
parent c99814492a
commit dd769768ca

View file

@ -71,10 +71,10 @@ public class ReplyingKafkaConfig {
private Map<String, Object> producerConfig() {
Map<String, Object> configProps = new HashMap<>();
configProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);
// configProps.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, securityProtocol);
// configProps.put(SaslConfigs.SASL_JAAS_CONFIG, loginModule + " required username=\""
// + username + "\" password=\"" + password + "\";");
// configProps.put(SaslConfigs.SASL_MECHANISM, saslMechanism);
configProps.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, securityProtocol);
configProps.put(SaslConfigs.SASL_JAAS_CONFIG, loginModule + " required username=\""
+ username + "\" password=\"" + password + "\";");
configProps.put(SaslConfigs.SASL_MECHANISM, saslMechanism);
configProps.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
return configProps;
}
@ -96,10 +96,10 @@ public class ReplyingKafkaConfig {
private Map<String, Object> consumerConfig() {
Map<String, Object> configProps = new HashMap<>();
configProps.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);
// configProps.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, securityProtocol);
// configProps.put(SaslConfigs.SASL_JAAS_CONFIG, loginModule + " required username=\""
// + username + "\" password=\"" + password + "\";");
// configProps.put(SaslConfigs.SASL_MECHANISM, saslMechanism);
configProps.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, securityProtocol);
configProps.put(SaslConfigs.SASL_JAAS_CONFIG, loginModule + " required username=\""
+ username + "\" password=\"" + password + "\";");
configProps.put(SaslConfigs.SASL_MECHANISM, saslMechanism);
configProps.put(ConsumerConfig.GROUP_ID_CONFIG, groupId);
configProps.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
return configProps;