Where does kafka store sections for topics?
By default on Linux, it is stored in /tmp/kafka-logs
. If you go to this folder, you will see something like this:
- restore point displacement control points
- Checkpoint offset replication
- theme-0
- message-0
- MSG-1
This means that you have two topics ( topic
which has 1 section and msg
which has 2).
As noted by Ludd, you can find the location within the file config/server.properties
by searching log.dirs
.
source to share
Try this command
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic test
you will get output
Topic:test Partition: 0 Leader: 1 Replicas: 1,2,0 Isr: 1,2,0
now try going to \config file
cat server.properties
and find broker_id
if it broker_id
matches the leader number, then the topics section is saved in this broker
source to share