问题

执行topic删除命令时,出现提示

Topic test is marked for deletion.
Note: This will have no impact if delete.topic.enable is not set to true.

这条命令其实并不执行删除动作,仅仅是在zookeeper上标记该topic要被删除而已,同时也提醒用户一定要提前打开delete.topic.enable开关,否则删除动作是不会执行的

解决

在server.properties中设置delete.topic.enable参数为ture
在Kafka版本1.0之后,server.properties配置文件中,delete.topic.enable不再显示设置,默认为true,如果需要改为false,可以自己添加,说明链接:说明

Topic deletion is now enabled by default, since the functionality is now stable. Users who wish to to retain the previous behavior should set the broker config delete.topic.enable to false. Keep in mind that topic deletion removes data and the operation is not reversible (i.e. there is no “undelete” operation)

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐