我是靠谱客的博主 羞涩水杯,最近开发中收集的这篇文章主要介绍四、kafka消费偏移量,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

https://blog.csdn.net/qq_21383435/article/details/109347429

1、查看消费组

[root@hadoop102 kafka_2.11-0.11.0.2]# bin/kafka-consumer-groups.sh --bootstrap-server hadoop102:9092 --list
Note: This will only show information about consumers that use the Java consumer API (non-ZooKeeper-based consumers).

console-consumer-30759
console-consumer-295
console-consumer-53111
console-consumer-88492
flume
console-consumer-18244

2、查看某个组的消费偏移量

[root@hadoop102 kafka_2.11-0.11.0.2]# bin/kafka-consumer-groups.sh --bootstrap-server hadoop102:9092 --describe --group flume
Note: This will only show information about consumers that use the Java consumer API (non-ZooKeeper-based consumers).

TOPIC                          PARTITION  CURRENT-OFFSET  LOG-END-OFFSET  LAG        CONSUMER-ID                                       HOST                           CLIENT-ID
topic_start                    0          7995            7995            0          consumer-2-3709d47c-0ff4-4a64-9c0a-7749e391ac1c   /192.168.137.104               consumer-2
topic_event                    0          7031            7031            0          consumer-1-4ad35506-745b-472e-a562-3bc2cb6f6768   /192.168.137.104               consumer-1

主题	分区	当前消费偏移量	最终偏移量 未消费数据	消费id ip	消费id

3、修改偏移量

注意修改策略:修改所有主题,还是某个主题所有分区,还是某个主题某个分区

https://blog.csdn.net/qq_21383435/article/details/109347429

工具修改
在这里插入图片描述

4、查看kafka数据

在这里插入图片描述
看到的是16进制字符串
在线工具转换:http://tools.bugscaner.com/text/zifuchuanzhuanhex.html

在这里插入图片描述

最后

以上就是羞涩水杯为你收集整理的四、kafka消费偏移量的全部内容,希望文章能够帮你解决四、kafka消费偏移量所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(73)

评论列表共有 0 条评论

立即
投稿
返回
顶部