Skip to content
Kafka Is Fun

Lesson 1 of 6

Kafka 4.0: ZooKeeper Is Gone

1 min read

  • ZooKeeper mode: removed in 4.0

Overview

Kafka 4.0, released in March 2025, is the first major release that runs entirely without Apache ZooKeeper. It supports only KRaft mode; ZooKeeper mode has been removed. A broker can be upgraded to 4.0 only if the cluster already runs in KRaft mode with software and metadata versions of at least 3.3.x, and a cluster still on ZooKeeper has to be migrated first. 3.9 is the last release line that supports ZooKeeper mode. Four other changes decide whether the upgrade goes smoothly. Brokers, Connect and the command-line tools now need Java 17, while clients and Kafka Streams need Java 11. Old protocol API versions are removed for the first time (KIP-896), so Java clients and brokers must both be on 2.1 or later before you upgrade. Message formats v0 and v1, MirrorMaker 1 and many deprecated client APIs are gone. And because 4.0 changes the metadata format, cluster metadata cannot be downgraded afterwards.

Analogy

Key configuration

Finishing the upgrade, and defaults that changedproperties
# After the rolling restart, verify, then finalize
bin/kafka-features.sh --bootstrap-server localhost:9092 upgrade --release-version 4.0

# Defaults that changed in 4.0
linger.ms: 0 -> 5
num.recovery.threads.per.data.dir: 1 -> 2
message.timestamp.after.max.ms: Long.MAX_VALUE -> 1 hour

# Removed
log.message.format.version, message.format.version
DefaultPartitioner, UniformStickyPartitioner
consumer poll(long)  (use poll(Duration))
Admin.alterConfigs  (use incrementalAlterConfigs)

Production tip

Check yourself

Which of these must be true before you upgrade a cluster's brokers to Kafka 4.0?

Sources

Checked against Kafka 4.3 documentation on Oct 2026. Draft: not yet reviewed by a Kafka specialist. Releases move on, so confirm against the current documentation before you act on a number.

Try it in the simulator

Guided scenarios for this module — the simulator opens with the exercise already running.

Prefer a picture? Open the live cluster in 3D and watch records move between producer, brokers and consumers.