hasherBaba
hasherBaba

Reputation: 339

How to retrieve all the topics of Kafka after system restart?

I want to retrieve all the topics that I created before shutting down my system.

However, I realised that the topics I created are no more once I rebooted my system.

I use the following commands: 1. bin/zookeeper-server-start.sh config/zookeeper.properties

  1. bin/kafka-server-start.sh config/server.properties

  2. bin/kafka-topics.sh --list --zookeeper localhost:2181 test

The 3rd command returns nothing. It seems that the topic I had created is lost.

What is the solution to this?

Upvotes: 1

Views: 249

Answers (1)

Giorgos Myrianthous
Giorgos Myrianthous

Reputation: 39830

Most probably, your Kafka logs are stored under /tmp directory. You need to change that location in the configuration file and set it into a permanent location which does not get wiped on reboot.

Upvotes: 1

Related Questions