for topic in `cat /tmp/topics.txt`; do echo $topic; sh kafka-topics.sh --bootstrap-servers localhost:9092 --topic $topic --delete; done # you can also delete the topics by wildcard sh kafka-topics.sh --bootstrap-servers localhost:9092 --topic abc.* --delete
On Tue, Jan 23, 2024 at 11:50 AM sunil chaudhari < sunilmchaudhar...@gmail.com> wrote: > Hi, > anybody there who has a shell script to delete topics from cluster. > I have list of elegible topics to be deleted. > Script should accept list of files as an input. > Delete topics one by one. > please share. > Thanks in advance. > > regards, > Sunil. >