How to delete a topic in Kafka

0 votes

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

As given in the documentation, I have executed:

bin/ --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,400 points

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Deleting topic isn't always working in

Deletion of a topic was added in the Kafka Version, 0.8.2 --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 will help!

answered Sep 4, 2018 by nitinrawat895
• 9,490 points

Related Questions In Apache Kafka

0 votes
0 answers

How to check pending messages in KAFKA topic?

Let say we have first_topic which has kafka_server_brokertopicmetrics_messagesin_total{instance="localhost:1120",job="kafka",topic="first_topic"}  ...READ MORE

May 2 in Apache Kafka by anonymous
0 votes
1 answer

How to commit message offsets in Kafka for reliable data pipeline?

You can use auto.commit.enable to allow Kafka ...READ MORE

answered Jul 9, 2018 in Apache Kafka by Shubham
• 12,890 points
0 votes
1 answer

Explain to me the functionality of Kafka in a Big-Data Cluster

Let me explain to you about Apache ...READ MORE

answered Apr 30 in Apache Kafka by ravikiran
• 2,360 points
0 votes
10 answers

Writing the Kafka consumer output to a file

System.out.println(String.valueOf(output.offset()) + ": " + new String(bytes, ...READ MORE

answered Dec 7, 2018 in Apache Kafka by Harsh
0 votes
11 answers

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

Add one line to file under ...READ MORE

answered Nov 27, 2018 in Apache Kafka by Lavanya
0 votes
1 answer

Kafka Elements

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

answered Sep 18, 2018 in Apache Kafka by kurt_cobain
• 9,260 points
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,340 points
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,260 points
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
• 9,490 points
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
• 9,490 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.