Here are the code, If any iisue , Please fix or help
var config = new ConsumerConfig
{
BootstrapServers = "XXX.XX.XXX.XXX:9092", // Your Kafka broker address and SSL port
SecurityProtocol = SecurityProtocol.Ssl,
SslCaLocation = @"C:\Prod/KITTING/client.pem", // Path to your CA certificate
SslCertificateLocation = @"C:\Prod/KITTING/client-crt.pem", // Path to your client certificate
SslKeyLocation = @"C:\Prod/KITTING/pkcs8.pem", // Path to your client private key
GroupId = "my-group",
AutoOffsetReset = AutoOffsetReset.Earliest // Or other desired offset reset policy
};
Amira BedhiafiPosted Aug 3, 2025, 5:13 PM
Hello Alok !
You will need these PEM encoded files:
client.crt: Client Certificateclient.keyorpkcs8.key: Client Private Key (must be in PKCS#8 format)ca.crt: CA certificate (the certificate that signed the Kafka broker certificate)