Are you looking something like this
String command = String.format("--delete --zookeeper %s --topic %s",
"localhost:2181", "test_topic");
String[] split = command.split(" ");
TopicCommand.main(split);
t
SunilKalva
On Mon, Oct 24, 2016 at 9:09 PM, Ali Akhtar wrote:
>
There isn't a java API for this, you'd have to mess around with bash
scripts which I haven't found to be worth it.
Just let the data expire and get deleted. Set a short expiry time for the
topic if necessary.
On Mon, Oct 24, 2016 at 6:30 PM, Demian Calcaprina
wrote:
>
There is a script kafka-topics.sh which calls kafka.admin.TopicCommand. I
think you could probably call that same class from your application if you
figure out which jars are needed. When I do testing I'll clear out queues by
setting the retention time to a second and then wait for kafka to