KafkaJS

A modern Apache Kafka client for Node.js

Library
npm
v2.2.4
4,005 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
51 /100 Fair
Development Activity 0
Maintenance 32
Community 72
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
74 /100 Good
Architecture 80
Code Quality 75
Innovation 68
Learning Curve 72

KafkaJS is a Node.js client for Apache Kafka compatible with Kafka 0.10 and above, offering producers, consumer groups with pause/resume/seek, transactional messaging, and an admin client, all implemented natively in JavaScript with no dependency on librdkafka bindings.

It supports Plain, SSL, and SASL_SSL connections including SCRAM-SHA-256/512 and AWS IAM authentication, plus pluggable compression codecs (GZIP built-in, Snappy/LZ4/ZSTD via plugins). While actively used across the ecosystem and integrated into frameworks like NestJS, the upstream repository has seen no commits since mid-2024, so evaluate maintenance status against your production requirements.

What You Get

  • Native JavaScript Kafka client with no librdkafka/native binding dependency
  • Producer API with batching, compression, and idempotent/transactional writes
  • Consumer groups with pause, resume, and manual seek support
  • Admin client for topic/partition management and cluster metadata
  • SSL and SASL_SSL support including SCRAM-SHA-256/512 and AWS IAM authentication
  • Pluggable compression codecs (GZIP built-in; Snappy, LZ4, ZSTD via plugins)

Common Use Cases

  • Building event-driven microservices that produce/consume Kafka topics from Node.js
  • Implementing exactly-once processing pipelines using transactional producers/consumers
  • Connecting to managed Kafka (Confluent Cloud, AWS MSK) via SASL/IAM authentication
  • Building admin tooling to manage topics, partitions, and consumer group offsets
  • Integrating Kafka messaging into NestJS or Express-based services

Under The Hood

Architecture - src/cluster maintains broker metadata and connection pooling, src/broker implements the low-level Kafka wire protocol request/response cycle, src/consumer layers consumer-group coordination (join/sync/heartbeat, partition assignment, offset commits) on top of that, src/producer handles batching and idempotent/transactional writes, and src/admin exposes cluster/topic management - all connected through an src/instrumentation event bus that powers KafkaJS’s built-in logging and metrics hooks.

Tech Stack - Plain JavaScript (no TypeScript source, though types/ ships hand-written .d.ts definitions), zero required native dependencies - compression codecs like Snappy/LZ4/ZSTD are optional peer packages - and the repo ships Docker Compose files for Kafka versions 0.10 through 2.4 to test protocol compatibility across a broad version matrix.

Code Quality - Jest-based test suite (jest.config.js, *.spec.js files colocated with source, e.g. src/index.spec.js) with snapshot tests and a testHelpers directory for spinning up integration tests against real brokers via docker-compose; the project has 3,097 total commits and 144 contributors historically, but has had no commits since August 2024, so newly-opened issues/PRs are not being actively triaged.

API Design - The API centers on kafka.producer() / kafka.consumer({groupId}) factories returning promise-based objects with a small, consistent method surface (send, subscribe, run), and the instrumentation event bus lets consumers hook into internal events (e.g. REQUEST, CONNECT) for logging/metrics without modifying core behavior - a well-regarded design that contributed to its popularity even as maintenance has slowed.

Used by 13 apps in this directory

TypeScript
96%
Other

Amplication

AI Code Assistants · Automation · Developer Tools

16,015

Create production-ready backend services with your organization's standards baked in — generating NestJS, Prisma, and GraphQL code that you own and control.

View details
58
Repo Health
84
Technical
60
Dependency
Built with
TypeScript 96%
Updated 3 months ago
TypeScript
92%
MIT

Dittofeed

Automation · Marketing

2,968

Open-source omni-channel customer engagement platform for automating transactional and marketing messages via email, SMS, WhatsApp, Slack, and mobile push.

View details
54
Repo Health
75
Technical
62
Dependency
Built with
TypeScript 92%
Updated 6 months ago
TypeScript
91%
Apache 2.0

Helicone

AI Development · Analytics · Monitoring

6,182

An open-source AI gateway and LLM observability platform that routes requests to 100+ models while logging cost, latency, and full traces for every call.

View details
70
Repo Health
81
Technical
65
Dependency
Built with
TypeScript 91%
Updated 2 weeks ago
TypeScript
71%
Other

highlight.io

Analytics · Developer Tools · Monitoring

9,378

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
67
Repo Health
78
Technical
65
Dependency
Built with
TypeScript 71%
Go 16%
Updated 1 months ago
TypeScript
99%
MIT

GraphQL Hive

Developer Tools · Devops · Monitoring

484

Open-source GraphQL schema registry and observability platform with breaking change detection, federation support, and CI/CD integration for teams of any size.

View details
90
Repo Health
81
Technical
69
Dependency
Built with
TypeScript 99%
Updated 4 days ago
TypeScript
61%
EPL-2.0

Huly Platform

Collaboration · Project Management · Team Chat

27,797

Open-source all-in-one workspace that replaces Linear, Jira, Slack, and Notion for product and engineering teams.

View details
90
Repo Health
86
Technical
62
Dependency
Built with
TypeScript 61%
Svelte 34%
Updated 6 days ago
TypeScript
94%
AGPL 3.0

Laudspeaker

Automation · Marketing

2,626

Open-source customer engagement platform for building visual, event-triggered messaging journeys across email, SMS, push, in-app, and webhooks.

View details
51
Repo Health
66
Technical
62
Dependency
Built with
TypeScript 94%
Updated 2 months ago
TypeScript
92%
Other

n8n

Automation · No Code Platforms

206,147

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
65
Dependency
Built with
TypeScript 92%
Updated 4 days ago
TypeScript
88%
AGPL 3.0

OpenPanel

Analytics

7,057

Open-source Mixpanel alternative with session replay, MCP integration, and privacy-first product analytics you fully control.

View details
74
Repo Health
74
Technical
65
Dependency
Built with
TypeScript 88%
MDX 10%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers