Kafka Config Generator

Configure server.properties for Apache Kafka brokers. Support for KRaft consensus, listener security, and strict topic governance.

Kafka Version

Broker Identity & KRaft Roles

Unique integer ID for this node (replaces broker.id).

Format: id@host:port (e.g., 1@localhost:9093,2@host2:9093).

Listeners & Network

The interfaces Kafka binds to. e.g., PLAINTEXT://0.0.0.0:9092.

The address clients use to connect. MUST be reachable by clients.

Storage & Topics

Comma-separated list of directories to store data.

Default number of partitions per topic.

Should be 3 for production.

Should be 2 for production (requires replication factor 3).

Log Retention

168 = 7 days.

Maximum size of the log before deleting. -1 means unlimited.

server.properties
1

Overview

Apache Kafka is the industry standard for high-throughput event streaming. Modern Kafka (v3.3+) has officially deprecated ZooKeeper in favor of KRaft (Kafka Raft), an internal consensus protocol that significantly simplifies deployment and improves scalability. Configuring server.properties correctly is essential for data durability and cluster stability.

Data Durability

Configure min.insync.replicas and unclean leader election to prevent silent data loss during node failures.

KRaft Consensus

Configure process roles (broker/controller) and quorum voters to eliminate the need for ZooKeeper.

Listener Security

Map protocol interfaces to ensure internal broker traffic is separated from external client traffic.

Production Checklist

  • Advertised Listeners: The most common Kafka connection error is misconfiguring advertised.listeners. It MUST resolve for the client machines, not just the broker.
  • Format Storage: When using KRaft, you cannot just start the broker. You must first generate a UUID and format the log directories using kafka-storage.sh.
  • Replication Factor: Ensure your default topic replication factor is 3, and your min.insync.replicas is 2. This allows you to lose one broker without downtime or data loss.
  • Hardware: Kafka is highly dependent on sequential disk I/O. Use fast NVMe SSDs or provisioned IOPS EBS volumes for the log.dirs.