kafka delete all topics
kafka delete all topics
#!/bin/bash
# Set you KAFKA_HOME to use
TOPICS=$($KAFKA_HOME/bin/kafka-topics.sh --bootstrap-server kafka1:9092 --list)
for T in $TOPICS
do
if [ "$T" != "__consumer_offsets" ]; then
$KAFKA_HOME/bin/kafka-topics.sh --bootstrap-server kafka1:9092 --delete --topic $T
fi
done
댓글남기기