0
votes

During Testing I do some operation like delete a topic. However I can see the topic after immeidately deleting it

Using: bin/kafka-topics.sh --list --zookeeper localhost:2181 It takes some time for deletion to actually occur.

This confused me.

Similarly when i produce data, i cannot consume immediately but have to wait for some time and re-run the consume command to consume data.

Is it because I am running a single node kafka set up and I am testing it too heavily.

1

1 Answers

0
votes
  1. If you want to delete a topic, you need to enable this via broker setting delete.topic.enable.

  2. Deleting a topic happens "asynchronously", ie, after you did issues the delete command, the topic gets marked as "to be deleted" and the broker will delete the topic at some point later on.

  3. About producing/consuming: not sure. If the consumer is online and the producer writes data it should up at the consumer shortly after...