Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out_kafka: Make MSVC compatible #1179

Merged
merged 1 commit into from
Apr 15, 2019
Merged

Conversation

cosmo0920
Copy link
Contributor

@cosmo0920 cosmo0920 commented Mar 8, 2019

librdkafka is already compatible for MinGW and MSVC.
For MSVC, we should avoid to link libpthread.

Signed-off-by: Hiroshi Hatake [email protected]


I've confirmed with the folllowing fluent-bit settings:

[INPUT]
    Name  dummy

[OUTPUT]
    Name        kafka
    Match       *
    Brokers     local-kafka-server-address:9092
    Topics      test
    Timestamp_Format iso8601 # or double
    Timestamp_Key @timestamp
    Format msgpack # or json
    rdkafka.log.connection.close false
    rdkafka.request.required.acks 1

Part of #960.

@cosmo0920
Copy link
Contributor Author

@fujimotos
Copy link
Member

@cosmo0920 Thanks! I confirmed it worked.

@cosmo0920
Copy link
Contributor Author

@edsiper Can we merge this?

@@ -14,4 +14,8 @@ set(src
kafka.c)

FLB_PLUGIN(out_kafka "${src}" "rdkafka")
target_link_libraries(flb-plugin-out_kafka -lpthread)
if (MSVC)
target_link_libraries(flb-plugin-out_kafka)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that line is doing nothing, the condition must be "if i am not on MSVC, link to pthread"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, that's too bad.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fixed at f95ad54.

@edsiper edsiper added the waiting-for-user Waiting for more information, tests or requested changes label Apr 9, 2019
librdkafka is already compatible for MinGW and MSVC.
For MSVC, we should avoid to link libpthread.

Signed-off-by: Hiroshi Hatake <[email protected]>
@edsiper edsiper merged commit 69fffab into fluent:master Apr 15, 2019
@edsiper
Copy link
Member

edsiper commented Apr 15, 2019

thanks

@cosmo0920 cosmo0920 deleted the out-kafka-msvc branch April 15, 2019 04:42
fujimotos pushed a commit to fujimotos/fluent-bit that referenced this pull request Dec 20, 2019
This reverts commit 69fffab.

Bakashar Kemerbay (and many other Windows users) reports that it
causes an immediate abort on Windows environments. In particular,
it causes abort even when they does not use out_kafka.

For example, I can confirm that even the following command does
not work on a vanilla Windows server.

    $ fluent-bit.exe -i dummy -o stdout

This is because librdkafka is dependent on OpenSSL (ssleay32.dll
and libeay32.dll), which most Windows servers do not have. Hence
fluent-bit.exe always fails due to missing DLL dependencies.

So we have to revert this, and revisit it after resolving the
dependency issue.

Signed-off-by: Fujimoto Seiji <[email protected]>
edsiper pushed a commit that referenced this pull request Dec 23, 2019
This reverts commit 69fffab.

Bakashar Kemerbay (and many other Windows users) reports that it
causes an immediate abort on Windows environments. In particular,
it causes abort even when they does not use out_kafka.

For example, I can confirm that even the following command does
not work on a vanilla Windows server.

    $ fluent-bit.exe -i dummy -o stdout

This is because librdkafka is dependent on OpenSSL (ssleay32.dll
and libeay32.dll), which most Windows servers do not have. Hence
fluent-bit.exe always fails due to missing DLL dependencies.

So we have to revert this, and revisit it after resolving the
dependency issue.

Signed-off-by: Fujimoto Seiji <[email protected]>
phiremande pushed a commit to phiremande/fluent-bit that referenced this pull request Dec 24, 2019
This reverts commit 69fffab.

Bakashar Kemerbay (and many other Windows users) reports that it
causes an immediate abort on Windows environments. In particular,
it causes abort even when they does not use out_kafka.

For example, I can confirm that even the following command does
not work on a vanilla Windows server.

    $ fluent-bit.exe -i dummy -o stdout

This is because librdkafka is dependent on OpenSSL (ssleay32.dll
and libeay32.dll), which most Windows servers do not have. Hence
fluent-bit.exe always fails due to missing DLL dependencies.

So we have to revert this, and revisit it after resolving the
dependency issue.

Signed-off-by: Fujimoto Seiji <[email protected]>
hassanfarid pushed a commit to hassanfarid/fluent-bit that referenced this pull request Dec 27, 2019
This reverts commit 69fffab.

Bakashar Kemerbay (and many other Windows users) reports that it
causes an immediate abort on Windows environments. In particular,
it causes abort even when they does not use out_kafka.

For example, I can confirm that even the following command does
not work on a vanilla Windows server.

    $ fluent-bit.exe -i dummy -o stdout

This is because librdkafka is dependent on OpenSSL (ssleay32.dll
and libeay32.dll), which most Windows servers do not have. Hence
fluent-bit.exe always fails due to missing DLL dependencies.

So we have to revert this, and revisit it after resolving the
dependency issue.

Signed-off-by: Fujimoto Seiji <[email protected]>
Signed-off-by: Hassan Farid <[email protected]>
edsiper pushed a commit that referenced this pull request Jan 23, 2020
This reverts commit 69fffab.

Bakashar Kemerbay (and many other Windows users) reports that it
causes an immediate abort on Windows environments. In particular,
it causes abort even when they does not use out_kafka.

For example, I can confirm that even the following command does
not work on a vanilla Windows server.

    $ fluent-bit.exe -i dummy -o stdout

This is because librdkafka is dependent on OpenSSL (ssleay32.dll
and libeay32.dll), which most Windows servers do not have. Hence
fluent-bit.exe always fails due to missing DLL dependencies.

So we have to revert this, and revisit it after resolving the
dependency issue.

Signed-off-by: Fujimoto Seiji <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-user Waiting for more information, tests or requested changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants