This repo demonstrates how to connect to a Kafka-enabled Azure Event Hubs using Confluent's .NET Client.
This doc describes how to provide auth config for connecting a Java-based Kafka Producer/Consumer. However the setting sasl.jaas.config
won't work with Confluent's .NET Client and will throw an exception:
Unhandled Exception: System.ArgumentException: Java JAAS configuration is not supported, see https://github.com/edenhill/librdkafka/wiki/Using-SASL-with-librdkafka for more information.
Instead of using sasl.jaas.config
, use sasl.username
and sasl.password
. Furthermore on Windows, default trusted root CA certs are stored in Windows Registry. They're not automatically discovered by Confluent client. You'll need to obtain these from somewhere else, hence I've used the cacert.pem
file distributed with curl, set its build setting to "Always copy to output directory" and reference it in the ssl.ca.location
.