设为首页 加入收藏

TOP

Kafka脚本总结
2019-04-18 14:36:34 】 浏览:76
Tags:Kafka 脚本 总结
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/csdncjh/article/details/79791847
//新建topic
bin/kafka-topics.sh --create --zookeeper node:2181 --topic test --partitions 2 --replication-factor 1


//修改partition数 只能增
./bin/kafka-topics.sh --alter --topic test2 --zookeeper node:2181 --partitions 3


//删除topic
bin/kafka-topics.sh --delete --topic test --zookeeper node:2181


//查看topic列表
bin/kafka-topics.sh --list --zookeeper node:2181


//查看消费情况
./bin/kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --zookeeper node:2181 --group jd-group4 --topic test2


//启动生产者
bin/kafka-console-consumer.sh --topic test6 --zookeeper node:2181


//启动消费者
bin/kafka-console-producer.sh --topic test6 --broker-list node:9092


//从头开始消费
bin/kafka-console-consumer.sh --zookeeper node:2181 --topic test --from-beginning
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Error while fetching metadata w.. 下一篇在windows搭建kafka并集成springb..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目