Which directory does apache kafka store the data in broker nodes

I can see a property in config/server.properties called log.dir? Does this mean kafka uses the same directory for storing logs and data both?


Kafka topics are "distributed and partitioned append only logs". Parameter log.dir defines where topics (ie, data) is stored.

It is not related to application/broker logging.

The default log.dir is /tmp/kafka-logs which you may want to change in case your OS has a /tmp directory cleaner.


log.dir or log.dirs in the config/server.properties specifiy the directories in which the log data is kept. The server log directory is kafka_base_dir/logs by default. You could modify it by specifying another directory for 'kafka.logs.dir' in log4j.properties.