Apache Kafka: KRaft, versions and upgrading from ZooKeeper
Apache Kafka is a distributed event-streaming platform: applications write streams of records into it, Kafka stores them durably for as long as you choose, and other applications read them in order. As of November 2026 the latest release is 4.4.0 (October 22, 2026), and since 4.0 Kafka runs only in KRaft mode, without Apache ZooKeeper.
What Kafka is
Think of Kafka as a set of append-only logs shared over the network. Each log is a topic, such as orders or page-views. Producers append records (a key, a value and a timestamp) to topics. Consumers read them, each keeping its own position, called an offset. Reading does not delete anything: records stay until the retention limit is reached (the sample broker configuration keeps them for 168 hours, or 7 days), so a new consumer can replay history and a failed one can resume where it stopped.
Two components ship with Kafka. Kafka Connect moves data between Kafka and other systems (databases, object storage, search engines) using connector plugins. Kafka Streams is a Java library for building applications that read, transform and write topics.
Typical uses
- Decoupling services. An order service publishes "order placed"; billing, shipping and email services each consume it at their own pace. If one is down for an hour, it catches up afterwards.
- Data pipelines. Changes from operational databases flow through Kafka into a data warehouse or lake, often processed further by Spark.
- Log and metrics collection. Many servers send events into one place where several tools read them.
- Stream processing. Fraud checks, live dashboards and alerts computed on events as they arrive.
Architecture in plain words
A Kafka cluster is made of servers that take one or both of two roles, set with process.roles:
- Brokers (
process.roles=broker) - Store the data and serve producers and consumers. Each topic is split into partitions so it can be spread over many brokers, and each partition is copied to several brokers (the replication factor). One copy is the leader; the others follow it and can take over if its broker fails. Records are ordered within a partition, and records with the same key always go to the same partition.
- Controllers (
process.roles=controller) - Manage cluster metadata: which topics and partitions exist, which broker leads each partition, configuration and access rules. In KRaft mode the controllers keep this metadata in their own replicated log using the Raft consensus protocol (hence the name: Kafka Raft). The documentation says administrators typically choose 3 or 5 controllers. A group of 3 keeps working if 1 fails; a group of 5 survives 2 failures.
- Combined (
process.roles=broker,controller) - One process does both. Good for development and the quickstart; the documentation says combined mode is not recommended in critical deployment environments.
Consumers that share a group id split a topic's partitions between them, so you scale reading by adding consumers, up to one per partition.
Supported versions
The downloads page lists three supported releases, as of November 2026. Bug-fix releases are made only for supported releases, and the project aims for three feature releases a year (one every four months), so each line is supported for roughly a year.
| Release | Released | Line started |
|---|---|---|
| 4.4.0 | October 22, 2026 | October 2026 |
| 4.3.2 | October 23, 2026 | May 22, 2026 (4.3.0) |
| 4.2.2 | September 29, 2026 | February 17, 2026 (4.2.0) |
Binaries for 4.x are built for Scala 2.13 only, so the file is named kafka_2.13-4.4.0.tgz; the "2.13" is the Scala version, not the Kafka version. The quickstart requires Java 17 or later. When 4.0 came out, brokers, Connect and the tools moved to Java 17, while clients and Kafka Streams still ran on Java 11.
Try it: the quickstart
With Java 17+ installed, download kafka_2.13-4.4.0.tgz from the downloads page, check it against the .sha512 and .asc files published beside it, then:
tar -xzf kafka_2.13-4.4.0.tgz
cd kafka_2.13-4.4.0
# One-time: create a cluster ID and format the storage directory
KAFKA_CLUSTER_ID="$(bin/kafka-storage.sh random-uuid)"
bin/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c config/server.properties
# Start a combined broker+controller (leave this terminal open)
bin/kafka-server-start.sh config/server.properties
In a second terminal, create a topic, write a few lines, and read them back:
bin/kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:9092
bin/kafka-console-producer.sh --topic quickstart-events --bootstrap-server localhost:9092
# type a few lines, then Ctrl+C
bin/kafka-console-consumer.sh --topic quickstart-events --from-beginning --bootstrap-server localhost:9092
To check the KRaft quorum (cluster ID, leader, voters):
bin/kafka-metadata-quorum.sh --bootstrap-server localhost:9092 describe --status
Or run the project's container image instead: docker run -p 9092:9092 apache/kafka:4.4.0 (a GraalVM-based apache/kafka-native image also exists).
Not for production as is. The sample config/server.properties uses PLAINTEXT listeners with no authentication or encryption, a replication factor of 1, and stores data under /tmp/kraft-combined-logs, which many systems wipe at reboot. For real clusters, run separate controllers, use replication factor 3, put data on dedicated disks, and turn on TLS and SASL authentication with ACLs.
ZooKeeper removal and upgrading
For most of its history Kafka needed a separate Apache ZooKeeper ensemble to store metadata. KRaft replaced it gradually, and the timeline matters if you still run an old cluster:
- 3.9.0 (November 6, 2024) was the final 3.x release and the last major line with the deprecated ZooKeeper mode. The project called it the "bridge" to 4.0, because it has the most mature ZooKeeper-to-KRaft migration tooling. 3.9.2 followed on February 21, 2026; 3.9 is no longer on the supported list.
- 4.0.0 (March 18, 2025) was announced as the first major release to operate entirely without ZooKeeper. ZooKeeper-related settings such as
zookeeper.connectare gone, and changingadvertised.listenersnow needs a restart of the server.
So the upgrade path from a ZooKeeper cluster is:
- Upgrade the ZooKeeper-mode cluster to 3.9.x.
- Migrate the metadata to KRaft controllers while still on 3.9, following the "ZooKeeper to KRaft Migration" section of the 3.9 documentation. A cluster in ZooKeeper mode cannot be upgraded to 4.x directly.
- Upgrade the KRaft cluster to 4.x. Brokers need software and metadata version 3.3 or later; KRaft clusters older than 3.3 should go to 3.9 first.
- Once every node runs the new version and you are sure you will not roll back, finalize the metadata version, for example:
The upgrade notes warn that metadata downgrade is not supported for this version, so this step is one-way.bin/kafka-features.sh --bootstrap-server localhost:9092 upgrade --release-version 4.0
Also update scripts and monitoring: command-line tools connect with --bootstrap-server, and ZooKeeper-only metrics no longer exist. Major releases remove APIs that were deprecated for at least 12 months, so test client applications before upgrading them.
Security notes
- Advisories. The project's CVE list on kafka.apache.org lists every vulnerability fixed in a release, with affected versions, fixed versions and mitigation advice. In autumn 2026 it listed several issues fixed only in 4.2.2, 4.3.2 and 4.4.0, including CVE-2026-112375 (an unauthorized principal could read arbitrary broker files through IncrementalAlterConfigs) and a group of denial-of-service bugs from unbounded memory allocation (for example CVE-2026-114349). Older lines are affected too: CVE-2026-112375 covers 3.2.0 through 4.1.2, and CVE-2026-114349 covers 0.11.0.0 through 4.1.2, so 4.1.x and older have no fixed release.
- Upgrading alone is not enough for CVE-2026-114349. The fix adds a limit,
max.decompressed.message.bytes, but for backward compatibility its default is effectively unlimited (about 2 GiB). The advisory says to upgrade and also set it, at broker or topic level, to a bounded value just above the largest legitimate decompressed record your applications produce. Until then, allow Write access only to trusted producers. - Reporting. Send undisclosed problems privately to
security@kafka.apache.org. - Updates. The project's contact page lists users, dev, jira and commits mailing lists but no separate announce list; follow the downloads page, the blog's release announcements, or the users list (
users-subscribe@kafka.apache.org). - Patch rolling. Within a line (4.3.1 to 4.3.2, for example) upgrade one server at a time, waiting until partitions are fully replicated again before moving on, so the cluster stays available.
Project links
- Kafka downloads (supported and archived releases)
- Quickstart
- CVE list and project security
Sources
- Downloads, Apache Kafka
- Quickstart, Apache Kafka
- KRaft, Apache Kafka 4.4 documentation
- config/server.properties, Apache Kafka source (4.4 branch)
- Apache Kafka 4.0.0 Release Announcement, Apache Kafka blog
- Apache Kafka 3.9.0 Release Announcement, Apache Kafka blog
- Apache Kafka blog (release announcements)
- Upgrading to 4.0, Apache Kafka documentation
- KRaft vs ZooKeeper, Apache Kafka 4.0 documentation
- CVE list, Apache Kafka
- Project security, Apache Kafka
- Contact (mailing lists), Apache Kafka