최대 1 분 소요

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

태그:

카테고리:

업데이트:

댓글남기기