768 B
768 B
learning kafka
Setup
Take a look at 01-broken-setup. Ideally when you setup, you need to have a meta.properties file in the kafka-data ( /var/lib/kafka/data ) directory. This file is created when Kafka starts for the first time.
#
#Sat Jan 24 19:02:17 GMT 2026
cluster.id=5L6g3nShT-eMCtK--X86sw
directory.id=Xsizaw8IS7uzzJrI-zTLMQ
node.id=1
version=1
If this file is missing, the docker image will make one. But in case you run multiple brokers, all need to have the same cluster.id. So they can talk to each other. This is known as generate/format Kraft storage.
Neede to run: sudo chown -R 1000:1000 kafka-data/ to give the kafka user ( uid 1000 ) permission to write to the volume mounted directory. First 1000 is user id, second 1000 is group id.