I'm using 0.8.1.1 I use DeleteTopicCommand to delete topic args[0] = "--topic"; args[1] = the topic you want to delete args[2] = "--zookeeper"; args[3] = kafkaZookeepers; DeleteTopicCommand.main(args);
You can write your own script to delete the topic, I guess. And I think it only deletes the entry in zookeeper Best, Siyuan On Wed, Jun 18, 2014 at 9:13 AM, Mark Roberts <wiz...@gmail.com> wrote: > When we were in testing phase, we would either create a new topic with the > correct details or shut the cluster down and hard kill the topic in > zookeeper + local disk. In prod we have the cluster configured via > configuration management and auto create turned off. > > The ability to delete a topic in a live, running kafka cluster is tricky, > and the implementations of it have been subtly incorrect (and therefore > dangerous). I know that there is work happening around that, but haven't > kept up with the status of it. Maybe in 8.2? It sounds conceptually > simpler to implement with the new metadata API. > > -Mark > > > On Jun 18, 2014, at 4:06, "Shlomi Hazan" <shl...@viber.com> wrote: > > > > Hi, > > > > Doing some evaluation testing, and accidently create a queue with wrong > > replication factor. > > > > Trying to delete as in: > > > > kafka_2.10-0.8.1.1/bin/kafka-topics.sh --zookeeper localhost:2181 > --delete > > --topic replicated-topic > > > > Yeilded: > > > > Command must include exactly one action: --list, --describe, --create or > > -alter > > > > Event though this page (https://kafka.apache.org/documentation.html) > says: > > > > > > > > And finally deleting a topic: > > > >> bin/kafka-topics.sh --zookeeper zk_host:port/chroot --delete --topic > > my_topic_name > > > > WARNING: Delete topic functionality is beta in 0.8.1. Please report any > bugs > > that you encounter on the <mailto:%20us...@kafka.apache.org> mailing > list or > > <https://issues.apache.org/jira/browse/KAFKA> JIRA. > > > > Kafka does not currently support reducing the number of partitions for a > > topic or changing the replication factor. > > > > What should I do? > > > > Shlomi > > >