The following configs work on Windows Server running confluent kafka 1.9.0.
{
“Settings”: {
“BootstrapServers”: “server.com:9093”,
“Topic”: “MyTopic”,
“SecurityProtocol”: “ssl”,
“GroupId”: “myappid”,
“ClientId”: “myClientID”,
“SslCaLocation”: “rootca.cer”,
“SslKeyLocation”: “KeysFromPfxFile.pem”,
“SslKeyPassword”: “mypassword”,
“SslCertificateLocation”: “CertFromPFXFile.pem”
}
}
The following configs do not work although the .pfx is the same file
the above .pems were exported
{
“Settings”: {
“ConsumerRun”: “true”,
“BootstrapServers”: “server.com:9093”,
“Topic”: “MyTopic”,
“SecurityProtocol”: “ssl”,
“GroupId”: “myappid”,
“ClientId”: “myClientID”,
“SslCaLocation”: “rootca.cer”,
“SslKeystorePassword”: “mypassword”,
“SslKeystoreLocation”: “PFXFile.pfx”,
“SslKeyPassword”: “mypassword”
}
}
System.InvalidOperationException: Error reading ssl.keystore.location PKCS#12 file: esscdcportalappiddev.us.bank-dns.com.pfx: error:0D06B08E:asn1 encoding routines:asn1_d2i_read_bio:not enough data
at Confluent.Kafka.Impl.SafeKafkaHandle.Create(RdKafkaType type, IntPtr config, IClient owner)
at Confluent.Kafka.Producer2..ctor(ProducerBuilder
2 builder)
at Confluent.Kafka.ProducerBuilder`2.Build()
at ConsolKafka_Producer.Program.Main(String args) in C:\Users\c079009\OneDrive\Projects\Kafka_Producer\ConsolKafka_Producer\Program.cs:line 221