<a id="nodejs-changelog"></a>

# Kafka JavaScript Client Changelog

## confluent-kafka-javascript 1.8.2

v1.8.2 is a maintenance release. It is supported for all usage.

### Enhancements

* Minor enhancement to JSON Schema validation reporting.
* Minor upgrade axios to 1.13.5.

### Fixes

* Fix security vulnerabilities in dependencies.
* Process Avro arrays sequentially to avoid race conditions.
* Add null checks to prevent segfaults when Kafka metadata contains `null` values during broker restarts. This fix adds comprehensive null safety checks for node pointers, partition leaders, ISR arrays, and replica arrays in the native C++ code, JavaScript wrapper, and TypeScript definitions.

#### NOTE
There was no v1.8.1 release.

## confluent-kafka-javascript 1.8.0

v1.8.0 is a feature release. It is supported for all usage.

### Enhancements

* References librdkafka v2.13.0. Refer to the [librdkafka v2.13.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.13.0) for more information.
* Export CelExecutor/CelFieldExecutor in Schema Registry `index.ts`.
* Minor improvement to rule failure message.
* Prevent a condition that causes fetch failures when max batch size is set or the default one and there’s a low consumption rate.

### Fixes

* Update dependency validator to v13.15.22 to fix security vulnerability.
* Prevent max message cache size reaching zero by having a minimum of one message per worker after the round up.

## confluent-kafka-javascript 1.7.0

v1.7.0 is a feature release. It is supported for all usage.

### Enhancements

* References librdkafka v2.12.1. Refer to the [librdkafka v2.12.1 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.12.1) for more information.
* Configurable batch size through the `js.consumer.max.batch.size` property and cache size through the `js.consumer.max.cache.size.per.worker.ms` property.
* Statistics callback now available when using the promisified API with all client types.
* Fix for at-least-once guarantee not ensured in case a seek happens on one partition and there are messages being fetched about other partitions.
* Avoid returning a negative lag in case there is no cached offset for the HWM.

## confluent-kafka-javascript 1.6.0

v1.6.0 is a feature release. It is supported for all usage.

### Enhancements

* References librdkafka v2.12.0. Refer to the [librdkafka v2.12.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.12.0) for more information.
* OAuth OIDC method example for Kafka metadata based authentication with an Azure IMDS endpoint using an attached managed identity as principal.

## confluent-kafka-javascript 1.5.0

v1.5.0 is a feature release. It is supported for all usage.

### Enhancements

* Adds support for `highWatermark`, `offsetLag()`, and `offsetLagLow()` in `eachBatch` callback.

### Fixes

* Fix issue of delay of up to five seconds in receiving messages after pause and resume, or seek.

## confluent-kafka-javascript v1.4.1

v1.4.1 is a maintenance release. It is supported for all usage.

### Enhancements

* References librdkafka v2.11.1. Refer to the [librdkafka v2.11.1 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.11.1) for more information.

## confluent-kafka-javascript v1.4.0

v1.4.0 is a feature release. It is supported for all usage.

### Enhancements

* References librdkafka v2.11.0. Refer to the [librdkafka v2.11.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.11.0) for more information.
* [KIP-848] `describeGroups()` now supports KIP-848 introduced `consumer` groups. Two new fields for consumer group type and target assignment have also been added. Type defines whether this group is a `classic` or `consumer` group. Target assignment is only valid for the `consumer` protocol and it defaults to being undefined.
* [KIP-848] Admin API for listing consumer groups now has an optional filter to return only groups of given types.
* Add support for Node v24 pre-built binaries.

## confluent-kafka-javascript v1.3.2

v1.3.2 is a maintenance release. It is supported for all usage.

### Enhancements

* References librdkafka v2.10.1. Refer to the [librdkafka v2.10.1 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.10.1) for more information.
* Support for schema ID in header.
* Add CEL support for Data Quality rules.

### Fixes

* Fix missing await during JSON deserialization.
* Fix possible NPE in CSFLE executor.

## confluent-kafka-javascript v1.3.1

v1.3.1 is a maintenance release. It is supported for all usage.

### Fixes

* Avoid a race condition that causes 100% usage of a CPU core when consuming with `partitionsConsumedConcurrently > 1` and all messages are consumed.
* Fix type definition for `Kafka()` constructor and for passing topic configurations to the `producer()` and `consumer()` in the promisified API.

## confluent-kafka-javascript v1.3.0

v1.3.0 is a feature release. It is supported for all usage.

### Enhancements

* References librdkafka v2.10.0. Refer to the [librdkafka v2.10.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.10.0) for more information.

### Fixes

* Support Protobuf oneof fields in Data Contract rules.
* Ensure use of DEK object is thread-safe.
* Fix token fetch to return after successful request.
* Add loose OAuth authorization.

## confluent-kafka-javascript v1.2.0

v1.2.0 is a feature release. It is supported for all usage.

### Enhancements

* Add support for an Admin API to fetch topic offsets by timestamp.
* References librdkafka v2.8.0. Refer to the [librdkafka v2.8.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.8.0) for more information.

### Fixes

* Fixes an issue where the `eachBatch` callback was being called for the same partition concurrently.
* Uses a Debian based builder instead of an Ubuntu based builder to ensure compatibility with older, but supported versions of Linux.

## confluent-kafka-javascript v1.1.0

v1.1.0 is a feature release. It is supported for all usage.

### Fixes

* Ensure algorithm query parameter is passed for CSFLE.
* Handle records nested in arrays or maps when searching for tags.

## confluent-kafka-javascript v1.0.0

v1.0.0 is a feature release. It is supported for all usage.

### Enhancements

* Add support for an Admin API to fetch topic offsets.
* Add support for Node v23 pre-built binaries.
* Add KafkaJS-compatible errors to promisified Admin API (createTopics, deleteGroups, deleteTopicRecords).
* Include error types within Type definitions for promisified API.

### Fixes

* Fixes an issue where `uv_async_init` was being called off the event loop thread, causing the node process to hang.

## confluent-kafka-javascript v0.6.1

v0.6.1 is a limited availability maintenance release. It is supported for all usage.

### Fixes

#### Schema Registry

* Sync aws-sdk packages to the same versioning.
* Minor enhancement to allow AWS profile to be specified.
* Add ability to override disable flag and actions on a rule.

## confluent-kafka-javascript v0.6.0

v0.6.0 is a limited availability maintenance release. It is supported for all usage.

### Fixes

#### Schema Registry

* Add AWS AssumeRole support to AWS KMS. You can now specify a role arn, and optional role session name, and optional role external ID.
* Ensure different key IDs use different client instances.

## confluent-kafka-javascript v0.5.2

v0.5.2 is a limited availability maintenance release. It is supported for all usage.

#### NOTE
v0.5.2 has no code changes from v0.5.1, version is bumped to sync with @confluentinc/schemaregistry.

## confluent-kafka-javascript v0.5.1

v0.5.1 is a limited availability maintenance release. It is supported for all usage.

### Fixes

* Fix an issue where `sendOffsets` wasn’t working correctly in the transactional producer.

## confluent-kafka-javascript v0.5.0

v0.5.0 is a limited availability feature release. It is supported for all usage.

#### NOTE
v0.5.0 was not released because of the bug mentioned in v0.5.1 section. Instead, v0.5.1 was released with the fix directly.

### Enhancements

* Add support for an Admin API to delete records.
* Add support for an Admin API to describe topics.
* Add support for dependent Admin client.
* References librdkafka v2.6.1. Refer to the [librdkafka v2.6.1 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.6.1) for more information.

### Fixes

* Fixes an issue with unresolved raced Promises leaking in the consumer.
* Removes Schema Registry dependencies from root `package.json` to prevent issues with Node 18.

## confluent-kafka-javascript v0.4.0

v0.4.0 is a limited availability feature release. It is supported for all usage.

### Enhancements

* Fixes an issue where headers were not passed correctly to the `eachBatch` callback.
* Add support for an Admin API to list a consumer group’s offsets.
* Reduce consumer poll timeout to zero and add wakeups for new messages. This improves the consumer efficiency, and resolves issues while running multiple consumers within the same node process.
* Add pre-built binaries for macOS (Intel).

## confluent-kafka-javascript v0.3.0

v0.3.0 is a limited availability feature release. It is supported for all usage.

### Enhancements

* References librdkafka v2.6.0. Refer to the [librdkafka v2.6.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.6.0) for more information.
* Minor optimization to reduce schema ID lookups.

## confluent-kafka-javascript v0.2.1

v0.2.1 is a limited availability release. It is supported for all usage.

### Features

* Update README, docs, and examples for Confluent’s Schema Registry client.

## confluent-kafka-javascript v0.2.0

v0.2.0 is a limited availability release. It is supported for all usage.

### Features

* Switch to using `librdkafka` on the latest released tag `v2.5.3` instead of `master`.

## confluent-kafka-javascript v0.1.17-devel

v0.1.17-devel is a pre-production, early-access release.

### Features

* Add a commitCb method to the callback-based API which allows committing asynchronously.
* Pass assign or unassign functions to the rebalance callback in the promisified API, allowing the user to control the assignment of partitions, or pause just after a rebalance.
* Remove store from promisified API and let the library handle all the stores.
* Add JavaScript-level debug logging to the client for debugging issues within the binding.
* Various fixes for performance and robustness of the consumer cache.
* Remove `consumerGroupId` argument from the `sendOffsets` method of the transactional producer, and instead only allow using a `consumer`.

### Fixes

* Do not modify RegExps that don’t start with a ^. Instead, throw an error so that there is no unexpected behaviour for the user.
* Do not mutate arguments in run, pause, and resume.
* Fix a segmentation fault in `listGroups` when passing `matchConsumerGroupStates` as undefined.

## confluent-kafka-javascript v0.1.16-devel

v0.1.16-devel is a pre-production, early-access release.

### Features

* Add per-partition concurrency to consumer.
* Add true `eachBatch` support to consumer.
* Add a `leaderEpoch` field to the topic partitions where required (such as listing and committing).

## confluent-kafka-javascript v0.1.15-devel

v0.1.15-devel is a pre-production, early-access release.

### Features

* Add Node v22 builds and bump librdkafka version on each version bump of this library.

## confluent-kafka-javascript v0.1.14-devel

v0.1.14-devel is a pre-production, early-access release.

### Features

* Add metadata to offset commit and offset store (non-promisified API).
* Add types for logger and loglevel to configuration.
* Add Producer polling from background thread. This improves performance for cases when send is awaited on.
* Enable consume optimization from v0.1.13-devel (Features #2) by default for the promisified API.

### Fixes

* Fix issues with the header conversions from promisified API to the non-promisified API to match the type signature and allow buffers to be passed as header values in the C++ layer.

## confluent-kafka-javascript v0.1.13-devel

v0.1.13-devel is a pre-production, early-access release.

### Features

* Add support for `storeOffsets` in the consumer API.
* Add optimization while consuming, in cases where the size of messages pending in our subscription is less than the consumer cache size.

### Fixes

* Fix memory leak in incremental assign.
* Fix various issues with typings, and reconcile typings, JavaScript code, and MIGRATION.md to be consistent.

## confluent-kafka-javascript v0.1.12-devel

v0.1.12-devel is a pre-production, early-access release.

### Features

* Add support for `listTopics` in the Admin API.
* Add support for OAUTHBEARER token refresh callback for both promisified and non-promisified API.

### Fixes

* Fix aliasing bug between `NodeKafka::Conf` and `RdKafka::ConfImpl`.
* Fix issue where `assign` and `unassign` were called instead of `incrementalAssign` and `incrementalUnassign` while using the Cooperative Sticky assigner, and setting the `rebalance_cb` as a boolean rather than as a function.
* Fix memory leaks in Dispatcher and Conf (both leaked memory at client close).
* Fix type definitions and make `KafkaJS` and `RdKafka` separate namespaces, while maintaining compatibility with node-rdkafka’s type definitions.

## confluent-kafka-javascript v0.1.11-devel

v0.1.11-devel is a pre-production, early-access release.

### Features

* Add support for `eachBatch` in the Consumer API (partial support for API compatibility).
* Add support for `listGroups`, `describeGroups`, and `deleteGroups` in the Admin API.

## confluent-kafka-javascript v0.1.10-devel

v0.1.10-devel is a pre-production, early-access release.

### Features

* Pre-built binaries for Windows (x64) added on an experimental basis.

## confluent-kafka-javascript v0.1.9-devel

v0.1.9-devel is a pre-production, early-access release.

### Features

* Pre-built binaries for Linux (both amd64 and arm64, both musl and glibc), for macOS (m1), for node versions 18, 20, and 21.
* Promisified API for Consumer, Producer, and Admin Client.
* Allow passing topic configuration properties via the global configuration block.
* Remove dependencies with security issues.
* Support for the Cooperative Sticky assigner.
