how to delete a topic using Kafka Consumer code example
Example: remove all data from kafka topic
kafka-topics.sh --zookeeper localhost:2181 --alter --topic topic1 --config retention.ms=1000
kafka-topics.sh --zookeeper localhost:2181 --alter --topic topic1 --config retention.ms=1000