How to delete a topic in Kafka 0 8 1 1

0 votes

I need to delete the topic "demo". The Kafka version installed on my system is Apache Kafka 0.8.1.1.

As given in the documentation, I have executed:

bin/kafka-topics.sh --zookeeper localhost:2181 --delete --topic demo
However, I'm getting the following message:

Command must include exactly one action: --list, --describe, --create or --alter
Is there any way to delete this topic?

Thanks in advance!

Sep 4, 2018 in Apache Kafka by Meci Matt
• 9,460 points
1,524 views

1 answer to this question.

0 votes

Deleting topic isn't always working in 0.8.1.1

Deletion of a topic was added in the Kafka Version, 0.8.2

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

When you run the above command you will see a message like below:

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

Hope this works for you!

Get your Kafka certification today to become certified professional

Thank You

answered Sep 4, 2018 by nitinrawat895
• 11,380 points

Related Questions In Apache Kafka

+1 vote
0 answers

how to delete the topic in kafka

How to stop Kafka server from crashing ...READ MORE

May 13, 2020 in Apache Kafka by sreeveena
• 150 points
1,044 views
0 votes
1 answer

How to create a Kafka topic in a broker?

Hi@akhtar, To create a Kafka topic, you need ...READ MORE

answered Dec 7, 2020 in Apache Kafka by MD
• 95,440 points
1,308 views
0 votes
1 answer

How to check pending messages in KAFKA topic?

kafka-run-class.bat kafka.tools.ConsumerOffsetChecker --broker-info --group test-consumer-group --topic test ...READ MORE

answered May 29, 2020 in Apache Kafka by chandra
10,177 views
0 votes
1 answer

How can I create a topic in apache kafka?

Hi@akhtar, To create kafka topic you can use ...READ MORE

answered Feb 6, 2020 in Apache Kafka by MD
• 95,440 points
792 views
0 votes
14 answers

How can I delete all the messages from a Kafka topic?

To delete all the messages from a Kafka topic.  There are many approach ...READ MORE

answered Jun 19, 2020 in Apache Kafka by Pawan
• 380 points
226,271 views
0 votes
1 answer

Kafka Elements

The most important elements of Kafka: Topic – ...READ MORE

answered Sep 19, 2018 in Apache Kafka by kurt_cobain
• 9,390 points
1,886 views
0 votes
1 answer

Kafka vs Flume

Even though both are used for real-time ...READ MORE

answered Sep 24, 2018 in Big Data Hadoop by Data_Nerd
• 2,390 points
665 views
0 votes
1 answer

Integrating Arduino to Apache Kafka

If you are using Arduino Yun to build your IoT application(s), ...READ MORE

answered Sep 27, 2018 in IoT (Internet of Things) by anonymous2
• 4,280 points
3,555 views
0 votes
1 answer

Is there any change in consumer offsets if a new partition(s) is added to a Kafka topic?

Yes, it stays the same. An offset is ...READ MORE

answered Jul 9, 2018 in Apache Kafka by nitinrawat895
• 11,380 points
2,087 views
0 votes
1 answer

How to purge Kafka Topic?

For your case what you can do ...READ MORE

answered Sep 4, 2018 in Apache Kafka by nitinrawat895
• 11,380 points
2,482 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP