Skip to content

Issue with application which links librdkafka++ dynamically #4969

Open
@vbezuglyy

Description

Hi,

I have an application which uses librdkafka with c++. Currently, I build librdkafka from sources as a static library and everything works nicely. Now, I'd like to switch to using librdkafka as shared library installed from yum repo. I can build my application, link with librdkafka++, where are no errors during compilation or linking and it's running. I use only producer to produce message but when I try to flush - the function returns garbage numeric value which cannot be translated and does nothing, no messages are send to the broker. If I enable logs, I can see that when producer is created, it succesfully connects to broker but on flush - there are no logs and nothing happens. Interestingly enough, if I don't use flush from c++ library but rd_kafka_flush(producer->c_ptr(), timeout) - it flushes messages to the broker. Did I encounter some ABI inconsistency? But why other functions work and only flush does not? Also, the library should have been build with the same compiler, so I am puzzled.

OS: RHEL8
Compiler: gcc8
Librdkafka version: 1.6.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions