1、命令行方式
①找到kafka安装文件夹
②执行命令
#指定offset为指定时间作为消息起始位置
kafka-consumer-groups.sh \
--bootstrap-server 20.2.246.116:9092 \
--group group_1 \
--topic lanxin_qiao \
--reset-offsets \
--to-datetime 2023-07-19T01:00:00.000 \
-execute
#打印输出消息到msg.txt
kafka-console-consumer.sh \
-topic lanxin_qiao \
--bootstrap-server 20.2.246.116:9092 \
--group group_1 >msg.txt 2>&1
2、软件方式
①软件下载地址:https://www.kafkatool.com/download2/offsetexplorer_64bit.exe


②然后点击test试一下能不能连上
③设置 Kafka 数据展示格式

④查看数据
