码迷,mamicode.com
首页 > Web开发 > 详细

kafka删除topic后再创建同名的topic报错(ERROR org.apache.kafka.common.errors.TopicExistsException)

时间:2019-07-13 22:44:50      阅读:494      评论:0      收藏:0      [点我收藏+]

标签:cto   删除   sum   src   除了   this   ice   同名   创建   

[hadoop@datanode3 logs]$ kafka-topics.sh --delete --zookeeper datanode1:2181 --topic first
Topic first is marked for deletion.
Note: This will have no impact if delete.topic.enable is not set to true.

 

[hadoop@datanode3 logs]$ kafka-topics.sh  --create --zookeeper datanode1:2181 --partitions 2 --replication-factor 3 --topic first

Error while executing topic command : Topic ‘first‘ already exists.

[2019-07-13 07:11:05,073] ERROR org.apache.kafka.common.errors.TopicExistsException: Topic ‘first‘ already exists.

 (kafka.admin.TopicCommand$)

 

 

报错原因是我当时kafka-console-producer.sh和kafka-console-consumer.sh都还在运行,删除只删除了部分patition

后来关掉kafka-console-producer.sh和kafka-console-consumer.sh进程后,再删除,再创建同名的topic就不报错了。

 

 技术图片

 

kafka删除topic后再创建同名的topic报错(ERROR org.apache.kafka.common.errors.TopicExistsException)

标签:cto   删除   sum   src   除了   this   ice   同名   创建   

原文地址:https://www.cnblogs.com/mkl34367803/p/11182365.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!