Search code examples
goapache-kafkacentos7librdkafka

Error: Invalid value "sasl_ssl" for configuration property "security.protocol")


When trying to connect to kafka consumer ( kafka_2.11-2.0.0 in Centos ) using golang, getting below error :

[ 2019_12_12_12:45:05 ] ---->  Kafka Consumer Connection Error (kafka.Error=Invalid value "sasl_ssl" for configuration property "security.protocol")

Code:

consumer, err = kafka.NewConsumer(&kafka.ConfigMap{
    "bootstrap.servers": "example.window.net:9093",
    "group.id":          "my-Group",
    "auto.offset.reset": "earliest",
    "sasl.mechanisms":   "PLAIN",
    "security.protocol": "sasl_ssl",
    "sasl.username":     "test",
    "sasl.password":     "test",
})
if err != nil {
    fmt.Sprintf("Kafka Consumer Connection Error", err)
}

Implemented kafka error but no use.

Thanks in advance


Solution

  • when librdkafka library was built without SSL support this error will come. On Centos you will need the openssl-devel package installed prior to configure. refer solution