启动kafka bin/kafka-server-start.
sh config/server.properties &
停止kafka bin/kafka-server-stop.sh
查看kafka状态是否运行 jps
检查kafka (在集群3台服务器上分别执行)
bin/kafka-topics.sh --list --zookeeper 118.190.87.33:2181,118.190.139.83:2181,118.190.88.157:2181/kafka
查看已经创建的topic列表
bin./kafka-topics.sh --list --zookeeper
192.168.15.186:2181,192.168.15.187:2181,192.168.15.188:2181/kafka
创建topic
bin/kafka-topics.sh —create —zookeeper 10.27.17.67:2181,10.27.17.151:2181,10.27.16.204:2181/kafka —replication-factor 3 —partitions 6 —topic bizcar_creditlock_response
bin/kafka-topics.sh --create --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka --replication-factor 3 --partitions 12 --topic bizcar_position_report
1、查看是否收到故障码
bin/kafka-console-consumer.sh --zookeeper 10.27.17.67:2181,10.27.17.151:2181,10.27.16.204:2181/kafka --topic bizcar_fault_report
bin/kafka-console-consumer.sh --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka --topic sendOtherAlarm
bin/kafka-console-consumer.sh --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka --topic bizcar_raw_report
2、查看多少未消费
2、查看多少未消费
![](https://i-blog.csdnimg.cn/blog_migrate/8bf5a043b86616fb28f037481f75c346.png)
./kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka --group test_consumer
./kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka --group=test_consumer
bin/kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka --group test_consumer
3.消费消息
5.启动kafka
./kafka-console-consumer.sh --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka --from-beginning --topic orderCancel
查看 bizcar_position_report未消费的
bin/kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka --group test_consumer --topic bizcar_position_report
4.真正有数据存在的分区是由生产发送端来决定,即使你的kafka设置了10个分区,消费端在消费的时候,消费线程虽然会根据zookeeper的某种机制来声明它所消费的分区,但实际消费过程中,还是会消费真正存在数据的分区。(本例中,你只往6个分区push了数据,所以即使你声明了10个分区,你也只能消费6个分区的数据)。
5.启动kafka
bin/kafka-server-start.sh config/server.properties
6.kafka若有未消费的数据
若消费组为none,,dse一直重启
5. 启动zookeeper
cd /app/zookeeper-3.4.10/bin
./zkServer.sh start
./zkServer.sh status 查看集群状态
2. dse重新锁车
tail -100f info.log|grep bizcar_gps_lock_response
tail -100f info.log|grep bizcar_position_report
3. 查看dse日志是否调用ws的
tail -100f info.log |grep "notify saas build All data"
cat info.log |grep bizcar_position_report
4,gw 语音播报
tail -10f kajiagw.log|grep this.ResponseMessageHexStr
tail -10f kajiagw.log|grep "this.ResponseMessageHexStr---8300"
5,故障码
spn,fmi