Blizzard / Blizzard/node-rdkafka
producer disconnect with callback errors
- Dominant language
- JavaScript
- Stars
- 2.2k
- Forks
- 403
- PR merge metrics
- No merged PRs in 30d
Description
**Environment Information**
- OS : Mac OS 12.2.1 (M1 Max)
- Node Version : 16.13.0
- NPM Version : 8.1.0
- C++ Toolchain :
% g++ --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: arm64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
- node-rdkafka version : 2.12.0
**Steps to Reproduce**
With this code in place:
```
this.producer?.disconnect(10000, (err, data) => {
console.log('Disconnected producer', err, data)
});
```
errors with:
```
---node_modules/node-rdkafka/lib/client.js:310
cb(null, metricsCopy);
TypeError: cb is not a function
at ---node_modules/node-rdkafka/lib/client.js:310:9
```
**node-rdkafka Configuration Settings**
**Additional context**
Contributor guide
Research direction
Start with lib/client.js at line 310 and reproduce the reported disconnect call on the stated Node.js and node-rdkafka versions. Trace the disconnect callback handling and verify the same snippet completes without the cb is not a function error; done means the producer disconnects without throwing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, kafka, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100