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

kcat built under Windows does not support the High-level KafkaConsumer mode #425

Open
drlsdee opened this issue Apr 4, 2023 · 0 comments · May be fixed by #426
Open

kcat built under Windows does not support the High-level KafkaConsumer mode #425

drlsdee opened this issue Apr 4, 2023 · 0 comments · May be fixed by #426

Comments

@drlsdee
Copy link

drlsdee commented Apr 4, 2023

Steps to reproduce

  1. Download the source code, latest release or even just pull from master
  2. Do not touch, edit etc, just build with MS Visual Studio and MSBuild (successfully)
  3. Try to subscribe to topics with High-level balanced KafkaConsumer
  4. Enjoy=)

Cause

  1. Various librdkafka version checks are performed in the kcat.h and kcat.c.
  2. But it is the check of librdkafka version >= 0.9.0 to enable ENABLE_KAFKACONSUMER that is done in configure.self (lines 28..33).
  3. Thus, at least when building with Visual Studio, the identifier ENABLE_KAFKACONSUMER remains unset.

Related problem

When building kcat on Windows with ENABLE_KAFKACONSUMER=1, error "E0020: identifier "LOG_DEBUG" is undefined" occurs.

Cause

  1. The identifier LOG_DEBUG is defined in syslog.h.
  2. When building under Windows, syslog.h is not included (see kcat.c, lines 29..38) because there is no version for Windows.

Possible solution

In win32_config.h (well, or somewhere else; it seems to me that since the problem occurs under Windows, it is best here)

  1. define identifiers LOG_* as in syslog.h;
  2. enable librdkafka version check >= 0.9.0 and definition of ENABLE_KAFKACONSUMER identifier
drlsdee added a commit to drlsdee/kcat that referenced this issue Apr 4, 2023
@drlsdee drlsdee linked a pull request Apr 4, 2023 that will close this issue
drlsdee added a commit to drlsdee/kcat that referenced this issue Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant