kafka查询命令

启动kafka:
./kafka-server-start.sh ../config/server.properties 1>/dev/null 2>&1 & # kafka-server-start.sh 脚本在 kafka_2.12-2.2.0/bin路径下


查看已创建的topic列表:
./kafka-topics.sh --list --zookeeper localhost:2181


查看对应topic的描述信息:
./kafka-topics.sh --describe --zookeeper xx.x.xxx.xxx:2181 --topic xxxxx.xx.xxxxx.xxx # --zookeeper为zookeeperIP, --topic为topic名称


消费消息:
./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic xxxxx.xx.xxxxx.xxx --from-beginning # 若没有任何返回或没有响应,则该topic中没有数据内容;否则就是有数据

相关文章

# 前言 现有主流消息中间件都是生产者-消费者模型,主要角色...
错误的根源是:kafka版本过高所致,2.2+=的版本,已经不需要...
DWS层主要是存放大宽表数据,此业务中主要是针对Kafka topic...
不多BB讲原理,只教你怎么用,看了全网没有比我更详细的了,...
终于写完了,其实最开始学kafka的时候是今年2月份,那时候还...
使用GPKafka实现Kafka数据导入Greenplum数据库踩坑问题记录(...