Is there support for SSL connections to Kafka for ...
# troubleshooting
p
Is there support for SSL connections to Kafka for the KafkaConsumer used by pinot? https://docs.pinot.apache.org/basics/data-import/pinot-stream-ingestion/import-from-apache-kafka I don’t see option to pass in keystore/truststore etc as part of the configuration?
k
@Pradeep Anything you put in streamConfigs with prefix
Copy code
kafka.consumer.prop
will be used to create the kafkaconsumer
p
awesome thanks
k
something like this should work
Copy code
kafka.consumer.prop.security.protocol=SSL
kafka.consumer.prop.ssl.truststore.location=/var/private/ssl/kafka.client.truststore.jks
kafka.consumer.prop.ssl.truststore.password=test1234
kafka.consumer.prop.ssl.keystore.location=/var/private/ssl/kafka.client.keystore.jks
kafka.consumer.prop.ssl.keystore.password=test1234
kafka.consumer.prop.ssl.key.password=test1234
@Neha Pawar @Subbu Subramaniam please confirm
n
no prefix needed. anything you put in the streamConfigs map should get passed on to the consumer
Copy code
Properties consumerProp = new Properties();
    consumerProp.putAll(streamConfig.getStreamConfigsMap());
    _consumer = new KafkaConsumer<>(consumerProp);
prefix is needed if you want to pass properties to the decoder:
Copy code
"stream.foo.decoder.prop.a.decoder.property" : "decoderPropValue",
p
nice, thanks