How to set "ssl.truststore.location = xxx" with confluent-kafka-dotnet

55 Views Asked by At

client-ssl.properties content:

           security.protocol=SSL
           ssl.truststore.location=/ssl/client.truststore.jks
           ssl.truststore.password=123456

c# code: using Confluent.Kafka; //2.3.0

            var config = new ProducerConfig
            {
                SaslMechanism = SaslMechanism.Plain,
                SecurityProtocol = SecurityProtocol.SaslSsl,
                SaslUsername = "Username",
                SaslPassword = "Password",
                SslTruststoreLocation = "/ssl/client.truststore.jks", //error
                SslTruststorePassword = "123456", //error
                // 其他 SSL 相关配置...
            };
            var producer = new ProducerBuilder<string, string>(config).Build();

question: ProducerConfig doesn't has any property like ssl.truststore.location and ssl.truststore.password, what should I do?

'ProducerConfig' does not contain a definition for 'SslTruststoreLocation'

0

There are 0 best solutions below