Documentation

Package

On this page

Upgrade between releases

This page covers upgrading this library. Use Migrating from KafkaJS when replacing a different client. Client differences describes persistent compatibility differences rather than a chronological release history.

Identify your current and target versions

npm ls @cookiemonsterdev/kafka-core @cookiemonsterdev/kafka-config @cookiemonsterdev/kafka-cli @cookiemonsterdev/kafka-studio

Read the release notes for every intervening release. Packages have independent releases: Core, Config, CLI, and Studio. Use the installed package’s bundled skills when they differ from the latest website.

Before changing the dependency

Record broker and runtime versions, partitioner selection, isolation, idempotence, and timeout settings. Review Compatibility and changes to defaults in release notes. Pin the desired package version in your lockfile and compile your application.

Verify before rollout

Exercise send/consume, offset commits, shutdown, authentication, and your error-recovery path against a staging cluster. For a change affecting partitioning or consumer group protocol, plan a coordinated rollout rather than assuming old and new processes are interchangeable. Check lag, retries, and error rates during deployment. Retain the previous lockfile and config for rollback; offset changes and external side effects require their own recovery plan.

Version-specific before and after

The removed partitioner alias is one concrete migration:

// Before: Partitioners.JavaCompatiblePartitioner
// After:
const producer = kafka.producer({ createPartitioner: Partitioners.DefaultPartitioner });

This is a fragment; import Partitioners from the package root. Only apply it if your old release used the removed alias. See Client differences.