kafka操作

http://blog.sina.com.cn/s/blog_628cc2b70102wdsb.html  异常

https://jingyan.baidu.com/article/eb9f7b6d367679869364e8d4.html  kafka管理

while read line
do
echo $line
kafka-configs.sh –zookeeper localhost:2181 –alter –entity-name $line –entity-type topics –add-config retention.ms=1000
kafka-configs.sh –zookeeper localhost:2181 –alter –entity-name $line –entity-type topics -add-config cleanup.policy=delete
kafka-topics.sh –delete –zookeeper localhost:2181 –topic $line
done < /opt/tmp.topics
kafka-run-class.sh kafka.tools.GetOffsetShell –broker-list localhost:9092 –topic qycloud-18.qycloud.nanjinganyuankeji_workflow     查看数量

kafka-topics.sh –list –zookeeper localhost:2181    查看topics

kafka-topics.sh –describe –zookeeper localhost:2181 –topic $line        查看topic详情

kafka-run-class.sh kafka.tools.ConsumerOffsetChecker  –group $group    查看偏移量