Kafka topics删除操作步骤

1、如果配置了delete.topic.enable=true 适合以下操作

  • 通过命令删除:./kafka-topics.sh --zookeeper 127.0.0.1:2181 --delete --topic apply_test
  • 通过zookeeper-client 删除掉broker下的topic, rmr /brokers/topics/apply_test
  • 删除kafka节点的 kafka/logs/apply_test-0,
  • 然后重启kafka集群
  • 重新创建即可: /data1/xinsrv/kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic apply_test

猜你喜欢

转载自www.cnblogs.com/stone1989/p/10917358.html