-
Notifications
You must be signed in to change notification settings - Fork 393
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
Make module self-register (Worker threads fix) #857
Conversation
Thanks for the PR. |
Yeah, us at PostHog too. Had some awful segfaults. We've since switched to https://kafka.js.org/ and it's a much smoother experience, though probably somewhat less performant than tapping into C. |
I have try change the addon library from Nan to node-addon-api to support Worker threads. But I'm not familiar with C++, it also have some bugs. The project link: https://github.com/node-rdkafka-next/node-rdkafka-next |
I've switched to |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
What does this solution look like to you? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
node-rdkafka
was incompatible with Worker threads due to legacy context awareness, this fixes the issue for relevant versions of Node.js (>=10.7.0), retaining the old behavior for versions before that. Giving credit where its due, used guidance from nodejs/node#21783 (comment) and work already made in the node-lzo code base.Test included.
Resolves #831.