8000 TypeInitializationException: The type initializer for 'RdKafka.Internal.LibRdKafka' threw an exception. · Issue #106 · ah-/rdkafka-dotnet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
TypeInitializationException: The type initializer for 'RdKafka.Internal.LibRdKafka' threw an exception. #106
Open
@Andrea

Description

@Andrea

Hi:

I was trying to run a minimal example of this library when this happened. I tried this both with 0.9.1 and 0.9.2rc

System.TypeInitializationException: The type initializer for 'RdKafka.Internal.LibRdKafka' threw an exception. ---> System.DllNotFoundException: librdkafka at at (wrapper managed-to-native) RdKafka.Internal.LibRdKafka+NativeMethods:rd_kafka_version () at RdKafka.Internal.LibRdKafka.version () [0x00000] in <e99050e294ca48589a30ccf96fe3f459>:0 at RdKafka.Internal.LibRdKafka..cctor () [0x0046e] in <e99050e294ca48589a30ccf96fe3f459>:0 --- End of inner exception stack trace --- at RdKafka.Internal.SafeConfigHandle.Create () [0x00000] in <e99050e294ca48589a30ccf96fe3f459>:0 at RdKafka.Config..ctor () [0x00006] in <e99050e294ca48589a30ccf96fe3f459>:0 at RdKafka.Producer..ctor (RdKafka.Config config, System.String brokerList) [0x00016] in <e99050e294ca48589a30ccf96fe3f459>:0 at RdKafka.Producer..ctor (System.String brokerList) [0x00000] in <e99050e294ca48589a30ccf96fe3f459>:0 at Program.main (System.String[] argv) [0x0001b] in /Users/andrea.magnorsky/source-external/example-rdkafka/rdkafka/Program.fs:10

I created a minimal project that replicates the problem, can be found here

open RdKafka
open System.Text
open System

[<EntryPoint>]
let main argv = 
    use p  = new Producer("127.0.0.1:2181")
    use topic = p.Topic("Bla")
    let datak = Encoding.UTF8.GetBytes("Hello RdKafka")
    let result = 
        async {
            let! deliveryReport = topic.Produce datak |> Async.AwaitTask
            printfn "Produced to Partition: %i, Offset: %i" deliveryReport.Partition deliveryReport.Offset
            return deliveryReport
            }
    0 // return an integer exit code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0