I have a code, which uses the Confluent Kafka library, written in C#.
I Am able to connect to the Azure event hub from my local system properly.
However, when I put the same in the container. I get the following error.
3|1656401522.469|ERROR|rdkafka#consumer-1| [thrd:app]: rdkafka#consumer-1: sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap: Disconnected (after 148ms in state UP)
%6|1656401522.626|FAIL|rdkafka#consumer-1| [thrd:sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap]: sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap: Disconnected (after 124ms in state UP, 1 identical error(s) suppressed)
%3|1656399913.942|ERROR|rdkafka#consumer-1| [thrd:sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap]: 1/1 brokers are down
%3|1656399922.791|ERROR|rdkafka#consumer-1| [thrd:sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap]: 1/1 brokers are down
fail: Microsoft.Extensions.Hosting.Internal.Host[9]
BackgroundService failed
Confluent.Kafka.ConsumeException: Broker: Topic authorization failed
Any suggestions here ? Anyone ?
New Error
Disconnected while requesting ApiVersion: might be caused by incorrect security.protocol configuration (connecting to a SSL listener?) or broker version is < 0.10 (see api.version.request) (after 0ms in state APIVERSION_QUERY, 4 identical error(s) suppressed)
Any my configuration
EnableAutoOffsetStore = false,
BootstrapServers = _configuration["KAFKA_SERVER"],
GroupId = consumerGroup,
AutoOffsetReset = AutoOffsetReset.Earliest,
SecurityProtocol = SecurityProtocol.SaslSsl,
SaslMechanism = SaslMechanism.Plain,
SaslUsername = "$ConnectionString",
SaslPassword = _configuration["EVENTHUB_CONNSTR"],
SslCaLocation = _configuration["EVENTHUB_CA_CERT_LOCATION"]