kafka 查看消费者组

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命令可以查看消费者组以及消费情况
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

鸭梨山大哎

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值