// the find
tulios/kafkajs
A modern Apache Kafka client for node.js
KafkaJS is a pure JavaScript Kafka client for Node.js with zero native dependencies. It covers the full Kafka feature set: producing, consuming with consumer groups, transactions, admin operations, and multiple auth mechanisms. Aimed at Node.js backend developers who want to avoid the librdkafka binding pain.
- No native dependencies — pure JS means no node-gyp hell, works across Node versions and architectures without recompilation
- Solid protocol coverage: transactions, SCRAM-SHA-256/512, AWS IAM, OAuthBearer, SSL, message headers, and pluggable compression codecs are all first-class
- Extensive test suite with integration tests per Kafka version (0.10 through 2.4) and Docker Compose files for each, so protocol compatibility regressions are catchable
- Instrumentation events API lets you attach Prometheus metrics or custom logging without monkey-patching internal state
- Last push was August 2024 and the issue tracker has piled up; the project appears to be in maintenance-only mode with no active feature development, which is a real risk for anything targeting Kafka 3.x features like KIP-848 consumer groups
- Pure JS implementation means throughput is noticeably lower than librdkafka-based clients (node-rdkafka, confluent-kafka-js) for high-volume producers — not a fit if you're pushing millions of messages per second
- No support for Kafka 3.x KRaft mode quirks or the newer APIs introduced post-2.4; version support is frozen at whatever was current when active development stopped
- TypeScript types are community-maintained and incomplete in places; the core codebase is plain JS with no JSDoc on internal modules, making debugging protocol-level issues painful