部署Kafka Offset Minotor:
•github下载jar包KafkaOffsetMonitor-assembly-0.2.0.jar :
https://github.com/quantifind/KafkaOffsetMonitor/releases
•启动Kafka Offset Minotor :
java -cp KafkaOffsetMonitor-assembly-0.2.0.jar com.quantifind.kafka.offsetapp.OffsetGetterWeb --zk 192.168.13.128:12181,192.168.13.130:12181,192.168.13.131:12181 --refresh 5.minutes --retain 1.day &

浏览界面查看topic和消费者分组:

kafka tools使用
下载地址
https://download.youkuaiyun.com/download/u010005147/10753983
参考博客
https://www.jianshu.com/p/aa196f24f332
https://blog.youkuaiyun.com/Dongguabai/article/details/86526299
添加kafka节点

属性值类型修改为string

命令行生产者生产数据 使用tool查看TOPIC数据:


JAVA代码配置的消费者ID在kafka终端显示出来了

查看消费者 当前在消费哪个partition的topic ,start, end ,以及偏移量offset

这里 group-id: console-consumer-110110配置了消费者ID
spring:
kafka:
bootstrap-servers: 10.175.19.193:9092
#=============== provider =======================
producer:
retries: 0
acks: all
batch-size: 16384 # 每次批量发送消息的数量
buffer-memory: 33554432
key-serializer: org.apache.kafka.common.serialization.StringSerializer # 指定消息key和消息体的编解码方式
value-serializer: org.apache.kafka.common.serialization.StringSerializer
#=============== consumer =======================
# 指定默认消费者group id
consumer:
group-id: console-consumer-110110
auto-offset-reset: earliest
enable-auto-commit: false
auto-commit-interval: 1000
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer # 指定消息key和消息体的编解码方式
value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
3288



被折叠的 条评论
为什么被折叠?



