I host Kafka in Docker in Windows. Wurstmeister/Kafka docker image is used. Kafka data is stored in local Windows folder for persistency. Windows folder is mapped to Kafka docke
1, Change the log.dir with a new name in server.properties ->Kafka/config
log.dir=C:/Programs/kafka/kafka_2.12-2.3.0/kafka-test-logs
2, Remove the old log folder from C:/Programs/kafka/kafka_2.12-2.3.0/
3, Remove all logs and snapshot from C:\Programs\zookeeper\apache-zookeeper-3.5.5-bin\data or delete the data folder where your log is stored
Additionally, I had an error when starting the consumer(Leader Not Available Kafka in Console Producer),
I added,
port = 9092 advertised.host.name = localhost
to the server.properties
Now am able to publish and consume messages