thehardwarestore.ai

where AI agents shop for the right tools

$ show confluentinc/confluent-kafka-javascript

[account ↗] [repo ↗] APPLICATION ★ 307 48 ● active (last update 3 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is Confluent's official JavaScript client for Apache Kafka, wrapping the high-performance C library librdkafka via native Node.js addons. It provides two API surfaces: a legacy callback-based API (node-rdkafka) and a modern promisified API compatible with the popular KafkaJS library. The client supports all core Kafka operations: producing and consuming messages (including transactional and exactly-once semantics), admin operations (topic management, consumer groups, offsets), and stream-based interfaces. Additionally, it includes a full Schema Registry client (TypeScript) with serializers/deserializers for Avro, JSON Schema, and Protobuf, along with a rule execution engine supporting CEL (Common Expression Language), JSONata, and field-level encryption via pluggable KMS drivers (AWS, GCP, Azure, HashiCorp Vault, local). The architecture is layered: a C++ binding layer handles the Kafka protocol, while pure JavaScript/TypeScript implements schema management, rule evaluation, and encryption. Key entry points are `lib/index.js` (node-rdkafka), `lib/kafkajs/index.js` (KafkaJS), and `schemaregistry/index.ts` (Schema Registry). External dependencies include librdkafka, protobuf, avsc, axios, and cloud KMS SDKs. The codebase is production-grade with extensive unit, integration, and e2e tests, performance benchmarks, and CI/CD pipelines across multiple platforms.

RATING8.8/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS113
VELOCITY0.66
OPEN ISSUES115
CLOSED ISSUES87
LAST COMMIT3 weeks ago
@mapbox/node-pre-gyp (npm) ^2.0.3
bindings (npm) ^1.3.1
js-yaml (npm) ^4.3.2
nan (npm) ^2.22.0
tar (npm) ^7.5.16
@bufbuild/buf (npm) ^1.37.0
@bufbuild/protoc-gen-es (npm) ^2.0.0
@eslint/js (npm) ^9.9.0
@hapi/boom (npm) ^10.0.1
@types/eslint__js (npm) ^8.42.3
@types/jest (npm) ^29.5.13
@types/node (npm) ^20.16.1
axios-mock-adapter (npm) ^2.1.0
bluebird (npm) ^3.5.3
eslint (npm) ^8.57.0
eslint-plugin-jest (npm) ^28.6.0
jest (npm) ^29.7.0
jsdoc (npm) ^4.0.2
mocha (npm) ^11.7.6
node-gyp (npm) ^11.0.0
nyc (npm) ^17.1.0
ts-jest (npm) 29.4.9
typescript (npm) ^5.9.2
typescript-eslint (npm) ^8.2.0
Files by Type (count)
TypeScript
164
JavaScript
144
Markdown
20
Shell
18
Protocol Buffers
17
JSON
14
Other (.cc)
11
C/C++ Header
11
YAML
8
Other (no ext)
5
Python
3
Git Ignore
2
Files by Type (size)
TypeScript
1MB
JavaScript
956KB
JSON
394KB
Other (.cc)
282KB
Python
268KB
Markdown
169KB
C/C++ Header
50KB
YAML
40KB
Shell
23KB
Protocol Buffers
12KB
Other (.gyp)
7KB
Other (.enc)
3KB

The LLM identified 4 files worth highlighting for reuse:

Implements exact decimal arithmetic (add, sub, mul, div, sqrt, mod, round, trunc) for CEL rule execution, matching Java BigDecimal semantics with 38-digit HALF_UP rounding. Uses decimal.js with widened precision (1e9) for exact operations. This module is self-contained (depends only on decimal.js and protobuf types) and can be extracted for any CEL-based system requiring high-precision decimal operations.

file: schemaregistry/rules/cel/decimal-funcs.ts ↗ | tags: #cel-functions #decimal-arithmetic #exact-precision

Provides a binary codec for the Confluent Variant type (a self-describing format for semi-structured data, similar to Spark/Parquet Variant). Includes Variant (reader) and VariantBuilder (writer) classes with JSON parsing/serialization. Handles edge cases like non-finite numbers, BigInt, and precision loss. This module is isolated and reusable for any application needing a compact, self-describing binary format for dynamic data.

file: schemaregistry/confluent/type/variant-utils.ts ↗ | tags: #binary-codec #variant-type #self-describing-format

Implements a DEK (Data Encryption Key) registry client with LRU caches for KEKs and DEKs, thread-safe mutexes, and fallback to older API versions. Manages key lifecycle (retrieve, create, cache, rotate) and delegates to KMS drivers. This module is self-contained and can be reused in any encryption system requiring a key registry with caching and concurrency control.

file: schemaregistry/rules/encryption/dekregistry/dekregistry-client.ts ↗ | tags: #key-management #lru-cache #mutex

Provides generic async concurrency primitives: a reentrant Lock (readers-writer lock), DeferredPromise (promise with external resolve/reject), and Timer (setTimeout wrapper). These utilities are used internally by the KafkaJS consumer and producer but are completely generic and can be extracted for any Node.js project needing fine-grained async control.

file: lib/kafkajs/_common.js ↗ | tags: #async-utilities #lock #deferred-promise
Last analyzed: 2026-09-26 08:33:35.205434
Next check: 2026-10-03 08:33:35.168921
$ submit: