0

I am trying to connect a producer with security.protocol conf property to plaintext. How to pass username and password to the Conf object before invoking RdKafka::Producer::create ?

None of the set call seems to fit. I read the doc about sasl for inspiration but it did not helped.

norisknofun
  • 807
  • 1
  • 8
  • 22
  • Can you post the code you've tried so far? Did you look at this example? https://github.com/edenhill/librdkafka/blob/master/examples/producer.cpp – jfarleyx Jan 05 '20 at 00:06
  • Yes, I checked it, nothing about setting any login/pwd. I runned the example there (working fine without credential) and tried to add auth infos with keys "username", "sasl_username" ... – norisknofun Jan 05 '20 at 16:02
  • The page https://docs.confluent.io/current/clients/librdkafka/md_CONFIGURATION.html do not provide any information about passing login/passwd when security.protocol=plaintext ... – norisknofun Jan 05 '20 at 16:02
  • In your code, you set the following keys: "sasl.username", "sasl.password", and "security.protocol"? Set security.protocol = sasl_plaintext if SSL is not enabled in your broker and set security.protocol = sasl_ssl if encryption is enabled. – jfarleyx Jan 05 '20 at 16:55
  • I set security.protocol=plaintext : this value is not valid ? I want plaintext protocol ! – norisknofun Jan 05 '20 at 17:55

0 Answers0