KafkaJS

A modern Apache Kafka client for Node.js

Library
npm
v2.2.4
4,003stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
51/100Fair
Development Activity0
Maintenance32
Community72
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
74/100Good
Architecture80
Code Quality75
Innovation68
Learning Curve72

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

Developer Tools · AI Code Assistants · Automation

16,010

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
61
Repo Health
84
Technical
60
Dependency
Built with
TypeScript96%
Updated 1 months ago
TypeScript
92%
MIT

Dittofeed

Marketing · Automation

2,903

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
63
Dependency
Built with
TypeScript92%
Updated 4 months ago
TypeScript
91%
Apache 2.0

Helicone

Monitoring · AI Development · Analytics

6,083

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
62
Repo Health
81
Technical
66
Dependency
Built with
TypeScript91%
Updated 3 days ago
TypeScript
71%
Other

highlight.io

Developer Tools · Analytics · Monitoring

9,367

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
69
Repo Health
78
Technical
66
Dependency
Built with
TypeScript71%
Go16%
Updated yesterday
TypeScript
98%
MIT

GraphQL Hive

Developer Tools · Devops · Monitoring

485

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
70
Dependency
Built with
TypeScript98%
Updated today
TypeScript
61%
EPL-2.0

Huly Platform

Project Management · Team Chat · Collaboration

27,384

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
64
Dependency
Built with
TypeScript61%
Svelte34%
Updated 1 weeks ago
TypeScript
94%
AGPL 3.0

Laudspeaker

Marketing · Automation

2,618

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

View details
53
Repo Health
66
Technical
64
Dependency
Built with
TypeScript94%
Updated 1 months ago
TypeScript
92%
Other

n8n

Automation · No Code Platforms

201,152

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
66
Dependency
Built with
TypeScript92%
Updated today
TypeScript
87%
AGPL 3.0

OpenPanel

Analytics

6,698

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

View details
75
Repo Health
74
Technical
69
Dependency
Built with
TypeScript87%
MDX11%
Updated today

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

Search