Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

c++ kafka secure connection

avatar
New Contributor

client :C++ client (librdkafka)

Used below config securely connect  to  cloudera kafka broker . 

SASL_SSL/GSSAPI - truststore/keystore  JKS files 

ssl.truststore.location=< JKS File >

ssl.truststore.password ='xxxxxx'

C++ client not accepting config as it is specific to  java .

Is there any alternate  mechanism available securely connect to cloudera broker

 and config supported by c++ clients? 

 

1 REPLY 1

avatar
Expert Contributor

@venkatpasya 

 

Your question is how to use C++ client (librdkafka) client to connect to a Kerberos + SSL authenticated cluster, please refer to the link below

https://github.com/edenhill/librdkafka

In the Features section, it is mentioned that librdkafka supports SASL (GSSAPI/Kerberos/SSPI, PLAIN, SCRAM, OAUTHBEARER) support.
&
SSL support

For specific examples, click the examples directory, or https://github.com/edenhill/librdkafka/tree/master/examples

For more detail:

Please take a look at this example
https://github.com/confluentinc/examples/tree/master/clients/cloud/c

In producer.c, it needs a configuration file config-file, and then calls read_config on line 160 to read line by line from config-file, and finally constructs the object conf. The read_config function is in common.c (from line 42 onwards). config-file can refer to https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md , all parameters are included in this link. What parameters need to be set in the Kerberos + SSL environment, please refer to point 5 in https://github.com/edenhill/librdkafka/wiki/Using-SASL-with-librdkafka .

 

If this information helped you, then it will be appreciated if you will take a moment to click on KUDOS 🙂 

 

Thank you.