bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
# Source: https://flowerinthenight.com/blog/2019/02/05/golang-cobra-klog | |
package main | |
import ( | |
goflag "flag" | |
"github.com/spf13/cobra" | |
flag "github.com/spf13/pflag" | |
"k8s.io/klog" | |
) |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...