Title
Page icon
Create new category
Edit page index title
Edit category
Edit link
Upgrade Standalone Kafka 4
This page explains how to start a standalone Kafka 3 cluster in KRaft mode, validate its functionality, and perform a rolling upgrade from Kafka 3.7.2.3.3.6.x-x to Kafka 4.3.0.3.3.6.x-x.
Start Kafka (3.7.2.3.3.6.x-x) in KRaft mode
For details about the ODP standalone binaries, see Accessing Acceldata Repositories.
Step 1: Configure the Kafka controllers
Controllers in KRaft mode are responsible for managing metadata across the cluster.
Edit the config/kraft/controller.properties file to define your controller configurations:
Step 2: Configure the Kafka broker
Once the controllers are set up, configure the brokers, which handle message storage and processing.
Edit the config/kraft/broker.properties file to define your broker configurations:
Step 3: Initialize the Kafka storage
In KRaft mode, Kafka uses a unique cluster.id to manage metadata. Before you start any services, generate and initialize the storage directories for the Kafka controllers and brokers:
Note Kafka3 requires Java to run. Ensure that Java 11 is installed by running the following command:
$ java -versionSet
JAVA_HOMEto point to Java 11. Ensure Kafka3 is running in KRaft mode. If it's running in ZooKeeper mode, follow the Zookeeper to Kraft Migration guide to migrate from ZooKeeper to KRaft before you perform the Kafka upgrade.
Step 4: Start the Kafka controllers
Once the configuration is complete, start the Kafka controller services. In KRaft mode, start the controllers first, because they manage the metadata for the brokers.
Step 5: Start the broker
Open another terminal session and run the broker service:
Once all the services are running, you have a basic Kafka environment ready for use.
Pre-upgrade validation
Before you proceed with the upgrade, validate the Kafka setup by completing the following steps.
Step 1: List topics
Example output:
Step 2: Create a test topic
Example output:
Step 3: Write events into the topic
Input:
Terminate with Ctrl-C.
Step 4: Read events from the topic
Example output:
Upgrade options
For details about upgrading Kafka 3 to Kafka 4, see the following pages: