kafka 查看消费者组
用kafka-consumer-groups.sh 命令可以查看消费者组,其中console-consumer-89657是消费的时候如果不设置消费者组自动生成的默认组[root@mypc01 config]# kafka-consumer-groups.sh \> --new-consumer \> --bootstrap-server mypc01:9092,mypc02:9092
·
用kafka-consumer-groups.sh
命令可以查看消费者组,其中console-consumer-89657是消费的时候如果不设置消费者组自动生成的默认组
[root@mypc01 config]# kafka-consumer-groups.sh \
> --new-consumer \
> --bootstrap-server mypc01:9092,mypc02:9092,mypc03:9092 \
> --list
The [new-consumer] option is deprecated and will be removed in a future major release.The new consumer is used by default if the [bootstrap-server] option is provided.
Note: This will not show information about old Zookeeper-based consumers.
console-consumer-89657
console-consumer-25399
console-consumer-92059
console-consumer-45548
console-consumer-3458
g2
还可以省略new-consumer
参数
kafka-consumer-groups.sh \
--bootstrap-server mypc01:9092,mypc02:9092,mypc03:9092 \
--list
查看消费情况,用describe参数+ 指定消费者组
,消费者组可以用上面的方法查
[root@mypc01 config]# kafka-consumer-groups.sh \
> --bootstrap-server mypc01:9092,mypc02:9092,mypc03:9092 \
> --describe \
> --group console-consumer-45548
TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG CONSUMER-ID HOST CLIENT-ID
cat 2 79668 79668 0 - - -
cat 1 79686 79686 0 - - -
cat 0 79682 79682 0 - - -
总结
kafka-consumer-groups.sh
命令可以查看消费者组以及消费情况
更多推荐
已为社区贡献15条内容
所有评论(0)