2
votes

I am using below configs in my container factory. After i add this config, i am not able to see anything being consumed by the spring-kafka consumer. Is there a standard way of setting the SSL for kafka consumer using spring. When i remove these configs, i am able to get the messages and consumer them.

config.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, "SSL")
config.put("ssl.keystore.location", "location_to/abc.keystore.jks"); //
config.put("ssl.keystore.password", "pwd1122");
config.put("ssl.truststore.location", "location_to/serv.truststore.jks");
config.put("ssl.truststore.password", "pwd11223");
1
Can you show your Broker Server properties? There should be something like the following line listeners=PLAINTEXT://localhost:9092,SSL://localhost:9093mike
mike, i would need to get those details. Thank you for your responseAJK1305
@mike I have it as below: listeners=SASL_SSL://localhost:9094AJK1305

1 Answers

1
votes

When i remove these configs, i am able to get the messages and consume[r] them.

That simply means the broker is not configured for SSL - the client and server have to agree to use SSL or not.

If the broker is configured with an SSL listener, it must be on another port.