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

consume callback has an incorrect typing #1055

Open
abarisain opened this issue Nov 15, 2023 · 0 comments
Open

consume callback has an incorrect typing #1055

abarisain opened this issue Nov 15, 2023 · 0 comments

Comments

@abarisain
Copy link

Environment Information

  • node-rdkafka version [e.g. 2.3.3]: 2.18.0

Steps to Reproduce

Use .consume(callback) from typescript. Type of "messages" in the callback is Message[] while the lib returns a single message. I have to force cast it to use it:

consumer.consume((err, msg) => {
  const message = msg as unknown as RDKafka.Message;

The .consume variant with two parameters is alright

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

No branches or pull requests

1 participant