本文介绍了在 Kafka 0.8.1.1 中删除主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要删除 Apache Kafka 0.8.1.1 中的主题 test.

I need to delete the topic test in Apache Kafka 0.8.1.1.

此处的文档中所述,我已执行:

bin/kafka-topics.sh --zookeeper localhost:2181 --delete --topic test

但是,这会导致以下消息:

However, this results in the following message:

Command must include exactly one action: --list, --describe, --create or --alter

如何删除此主题?

推荐答案

在 0.8.1.1 中删除主题并不总是有效

Deleting topic isn't always working in 0.8.1.1

删除应该在下一个版本中起作用,0.8.2

Deletion should be working in the next release, 0.8.2

kafka-topics.sh --delete --zookeeper localhost:2181 --topic your_topic_name

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

是否可以删除主题?

Jira KAFKA-1397

这篇关于在 Kafka 0.8.1.1 中删除主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 20:26