confluentinc / confluent-kafka-dotnet

Confluent's Apache Kafka .NET client
https://github.com/confluentinc/confluent-kafka-dotnet/wiki
Apache License 2.0
82 stars 866 forks source link

Unity 2019.3.3 NuGet for Unity librdkafka.dll failed to load #1201

Open 0x6c6565 opened 4 years ago

0x6c6565 commented 4 years ago

I'm trying to use NuGet For Unity to set up Kafka in Unity 2019.3.3 on Windows 10. Everything comes into the project fine, but...

When I test:

string hostAndPort; // Set to a valid Kafka host:port

ProducerConfig config = new ProducerConfig() { BootstrapServers = hostAndPort }; ProducerBuilder<Null, string> builder = new ProducerBuilder<Null, string>(config);

// FAILED TO LOAD librdkafka.dll // builder.Build(); // FAILED TO LOAD librdkafka.dll //

========= Environment:

Literally, ANY help is appreciated. I cannot locate a walk through of how to get this set up- only random suggestions and bug complaints.

Thanks,

mhowlett commented 4 years ago

try using Library.Load, specifying an absolute path to a librdkafka.dll before using any other Confluent.Kafka method (and let us know if it works!).

We don't test with unity, i need to do so and see what's up.

0x6c6565 commented 4 years ago

I think it's an issue with NuGet for Unity- which was recommended somewhere in here... I'm not getting the libraries (dlls).

0x6c6565 commented 4 years ago

@mhowlett I tried pulling the package (and its dependencies) into VS and then bring them into a Unity project and then calling Library.Load(). I get the following error:

Win32Exception: %1 is not a valid Win32 application.

mhowlett commented 4 years ago

i've labelled this as enhancement because we'd like to support unity. unfortunately don't have time to investigate atm.