Confluent.Kafka 在.net core下的坑

centos 下运行报错:

Unhandled Exception: System.DllNotFoundException: Failed to load the librdkafka native library.
   at Confluent.Kafka.Impl.LibRdKafka.Initialize(String userSpecifiedPath) in C:\Users\sugar\Desktop\confluent-kafka-dotnet-master\src\Confluent.Kafka\Impl\LibRdKafka.cs:line 273
   at Confluent.Kafka.Producer..ctor(IEnumerable`1 config, Boolean manualPoll, Boolean disableDeliveryReports) in C:\Users\sugar\Desktop\confluent-kafka-dotnet-master\src\Confluent.Kafka\Producer.cs:line 258
   at Confluent.Kafka.Producer`2..ctor(IEnumerable`1 config, ISerializer`1 keySerializer, ISerializer`1 valueSerializer, Boolean manualPoll, Boolean disableDeliveryReports) in C:\Users\sugar\Desktop\confluent-kafka-dotnet-master\src\Confluent.Kafka\Producer.cs:line 1044
   at Confluent.Kafka.Examples.SimpleProducer.Program.Main(String[] args) in C:\Users\sugar\Desktop\confluent-kafka-dotnet-master\examples\SimpleProducer\Program.cs:line 42

Aborted

查看报错,明明在centos上运行,为什么会进这个if?想想难道是发布有问题??重新下载

Confluent.Kafka 在.net core下的坑_第1张图片

Confluent.Kafka 在.net core下的坑_第2张图片

这个版本在centos上调试也爆相同错误,实在搞不定。建议直接更换Rdkafka。

你可能感兴趣的:(net,core)