Blizzard / Blizzard/node-rdkafka

Does 2.12.0 support being used in worker-threads?

Open
#936 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.2k
Forks
403
PR merge metrics
No merged PRs in 30d

Description

**Environment Information**
- OS [cent os 7]:
- Node Version [16.13.1]:
- NPM Version [8.1.2]:
- C++ Toolchain [g++ 7.3.1, node-gyp: 8.4.1]:
- node-rdkafka version [e.g. 2.12.0]:

**Steps to Reproduce**
Create a worker thread and require('node-rdkafka');
Results: I see errors consistent with the library not being context aware when initializing in a worker thread. This isn't an issue when I use require('node-rdkafka') in the main thread.

**node-rdkafka Configuration Settings**
Nothing special

**Additional context**
I understand that there have been issues with getting node-rdkafka libraries and or itself to be context aware. It sounds like the issue was fixed, https://github.com/Blizzard/node-rdkafka/pull/857 but I may have misread.

I am wondering
* Do I need to clone master from github? Or is there a beta version with this fixed?
* Is there anything I can do to make this work?

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported case by creating a Node.js worker thread and requiring node-rdkafka under Node 16.13.1 with version 2.12.0; compare it with requiring the module in the main thread and review PR #857 for context-awareness details. Done should establish whether 2.12.0 supports worker threads and identify the relevant release or change, but the issue names no target file or test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, kafka, node.js
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.