kafka 删除 topic

  1. Stop Kafka server
  2. Delete the topic directory with rm -rf command
  3. Connect to Zookeeper instance: zookeeper-shell.sh host:port
  4. ls /brokers/topics
  5. Remove the topic folder from ZooKeeper using rmr /brokers/topics/yourtopic
  6. Restart Kafka server
  7. Confirm if it was deleted or not by using this command kafka-topics.sh --list --zookeeper host:port

你可能感兴趣的:(kafka 删除 topic)