I'm trying to connect to kafka using ssl. I used the conan package for modern-cpp-kafka. I seem to be getting a property error when I try to set the security protocol to ssl
KafkaProducer[219dd444-cbc95e50] failed to be initialized with property[security.protocol:ssl], result[-1]
KafkaProducer[219dd444-cbc95e50] failed to be initialized with property[ssl.ca.location:/kafka/ca.crt], result[-1]
KafkaProducer[219dd444-cbc95e50] failed to be initialized with property[ssl.certificate.location:/kafka/user.crt], result[-1]
KafkaProducer[219dd444-cbc95e50] failed to be initialized with property[ssl.key.location:/kafka/user.key], result[-1]
KafkaProducer[219dd444-cbc95e50] initializes with properties[bootstrap.servers=kafka-kafka-bootstrap.kafka:9093|client.id=219dd444-cbc95e50|log_level=5]
From the driver code it appears that the error happens in rd_kafka_conf_set when called from KafkaClient::KafkaClient
const rd_kafka_conf_res_t result = rd_kafka_conf_set(rk_conf.get(), k.c_str(), v->c_str(), errInfo.str(), errInfo.capacity()); if (result == RD_KAFKA_CONF_OK) { _properties.put(prop.first, prop.second); } else { KAFKA_API_DO_LOG(Log::Level::Err, "failed to be initialized with property[%s:%s], result[%d]", k.c_str(), v->c_str(), result); }
But the errorInfo doesn't get sent to the callback function.
I'm trying to connect to kafka using ssl. I used the conan package for modern-cpp-kafka. I seem to be getting a property error when I try to set the security protocol to ssl
`
I get an error in the log
From the driver code it appears that the error happens in rd_kafka_conf_set when called from KafkaClient::KafkaClient
const rd_kafka_conf_res_t result = rd_kafka_conf_set(rk_conf.get(), k.c_str(), v->c_str(), errInfo.str(), errInfo.capacity()); if (result == RD_KAFKA_CONF_OK) { _properties.put(prop.first, prop.second); } else { KAFKA_API_DO_LOG(Log::Level::Err, "failed to be initialized with property[%s:%s], result[%d]", k.c_str(), v->c_str(), result); }
But the errorInfo doesn't get sent to the callback function.
I built the conan packages with
conan install -if build . --settings compiler.version=11 -o librdkafka:ssl=True
I'm using modern-cpp-kafka/2023.03.07 which seems to be the latest version available thru' Conan.