二丫讲梵 二丫讲梵
首页
  • 最佳实践
  • 迎刃而解
  • Nginx
  • Php
  • Zabbix
  • AWS
  • Prometheus
  • Grafana
  • CentOS
  • Systemd
  • Docker
  • Rancher
  • Ansible
  • Ldap
  • Gitlab
  • GitHub
  • Etcd
  • Consul
  • RabbitMQ
  • Kafka
  • MySql
  • MongoDB
  • OpenVPN
  • KVM
  • VMware
  • Other
  • ELK
  • K8S
  • LLM
  • Nexus
  • Jenkins
  • 随写编年
  • 家人物语
  • 追忆青春
  • 父亲的朋友圈
  • 电影音乐
  • 效率工具
  • 博客相关
  • Shell
  • 前端实践
  • Vue学习笔记
  • Golang学习笔记
  • Golang编程技巧
  • 学习周刊
  • Obsidian插件周刊
关于
友链
  • 本站索引

    • 分类
    • 标签
    • 归档
  • 本站页面

    • 导航
    • 打赏
  • 我的工具

    • 备忘录清单 (opens new window)
    • json2go (opens new window)
    • gopher (opens new window)
    • 微信MD编辑 (opens new window)
    • 国内镜像 (opens new window)
    • 出口IP查询 (opens new window)
    • 代码高亮工具 (opens new window)
  • 外站页面

    • 开往 (opens new window)
    • ldapdoc (opens new window)
    • HowToStartOpenSource (opens new window)
    • vdoing-template (opens new window)
GitHub (opens new window)

二丫讲梵

行者常至,为者常成
首页
  • 最佳实践
  • 迎刃而解
  • Nginx
  • Php
  • Zabbix
  • AWS
  • Prometheus
  • Grafana
  • CentOS
  • Systemd
  • Docker
  • Rancher
  • Ansible
  • Ldap
  • Gitlab
  • GitHub
  • Etcd
  • Consul
  • RabbitMQ
  • Kafka
  • MySql
  • MongoDB
  • OpenVPN
  • KVM
  • VMware
  • Other
  • ELK
  • K8S
  • LLM
  • Nexus
  • Jenkins
  • 随写编年
  • 家人物语
  • 追忆青春
  • 父亲的朋友圈
  • 电影音乐
  • 效率工具
  • 博客相关
  • Shell
  • 前端实践
  • Vue学习笔记
  • Golang学习笔记
  • Golang编程技巧
  • 学习周刊
  • Obsidian插件周刊
关于
友链
  • 本站索引

    • 分类
    • 标签
    • 归档
  • 本站页面

    • 导航
    • 打赏
  • 我的工具

    • 备忘录清单 (opens new window)
    • json2go (opens new window)
    • gopher (opens new window)
    • 微信MD编辑 (opens new window)
    • 国内镜像 (opens new window)
    • 出口IP查询 (opens new window)
    • 代码高亮工具 (opens new window)
  • 外站页面

    • 开往 (opens new window)
    • ldapdoc (opens new window)
    • HowToStartOpenSource (opens new window)
    • vdoing-template (opens new window)
GitHub (opens new window)
  • 最佳实践

  • 迎刃而解

  • Nginx

  • Php

  • Zabbix

  • AWS

  • Prometheus

  • Grafana

  • Loki

  • CentOS

  • Supervisord

  • Systemd

  • Docker

  • Docker-Compose

  • Rancher

  • Ansible

  • OpenLdap

  • GitLab

  • GitHub

  • Etcd

  • Consul

  • RabbitMQ

  • Kafka

    • kafka-2-11单机部署
    • kafka-2-11集群部署
    • kafka-2-11集群监控
    • kafka历史数据清理策略以及配置
    • 如何删除kafka消费组
  • Mysql

  • MongoDB

  • OpenVPN

  • Kvm

  • VMware

  • 配置文件详解

  • Other

  • 运维观止
  • Kafka
二丫讲梵
2021-07-10

如何删除kafka消费组

文章发布较早,内容可能过时,阅读注意甄别。

当一个 topic 写入到 kafka,而我们接入了多了个消费组,这种情况下,其中某个消费组停止消费,却会看到对应消费组的消息堆积依然在叠加,这是个奇怪的问题,暂时不知道什么原因,不过可以通过如下方式,将这个消费组删除,如果这些消息内容不是很重要的话。

堆积如下图:

image-20200831094331365

此时来到 kafka 集群,进行一波查看:

cd /usr/local/kafka/bin
1

查看对应消费组:

./kafka-consumer-groups.sh --bootstrap-server 10.3.9.105:9092 --list|grep vector
1

查看该消费组详情:

./kafka-consumer-groups.sh --bootstrap-server 10.3.9.105:9092 --describe --group vector-group

Consumer group 'vector-group' has no active members.

TOPIC             PARTITION  CURRENT-OFFSET  LOG-END-OFFSET  LAG             CONSUMER-ID     HOST            CLIENT-ID
nginx_access-json 6          20860823645     20863941258     3117613         -               -               -
nginx_access-json 32         7079366043      7082484017      3117974         -               -               -
nginx_access-json 19         18831750772     18834869297     3118525         -               -               -
nginx_access-json 25         7079254321      7082372335      3118014         -               -               -
nginx_access-json 16         18831738315     18834855686     3117371         -               -               -
nginx_access-json 5          26853103894     26856224627     3120733         -               -               -
nginx_access-json 26         7079407716      7082528677      3120961         -               -               -
nginx_access-json 10         20860709161     20863824916     3115755         -               -               -
nginx_access-json 2          26853198869     26856314382     3115513         -               -               -
nginx_access-json 9          20860734059     20863849934     3115875         -               -               -
nginx_access-json 20         7079285753      7082406080      3120327         -               -               -
nginx_access-json 17         18831568395     18834686220     3117825         -               -               -
nginx_access-json 11         20860468934     20863586315     3117381         -               -               -
nginx_access-json 3          26853057203     26856172911     3115708         -               -               -
nginx_access-json 33         7079427219      7082542547      3115328         -               -               -
nginx_access-json 24         7079333972      7082449832      3115860         -               -               -
nginx_access-json 31         7079275520      7082390038      3114518         -               -               -
nginx_access-json 23         7079305622      7082421647      3116025         -               -               -
nginx_access-json 30         7079513281      7082630851      3117570         -               -               -
nginx_access-json 27         7079328833      7082447027      3118194         -               -               -
nginx_access-json 4          26852831434     26855949848     3118414         -               -               -
nginx_access-json 12         18831619833     18834735405     3115572         -               -               -
nginx_access-json 13         18831782140     18834896831     3114691         -               -               -
nginx_access-json 18         18831578690     18834692791     3114101         -               -               -
nginx_access-json 34         7079300839      7082416771      3115932         -               -               -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

删除之:

./kafka-consumer-groups.sh --bootstrap-server 10.3.9.105:9092 --delete --group vector-group
1

然后再看堆积的监控,就没有新的消息往里边注入了。

微信 支付宝
#kafka
上次更新: 2024/07/04, 22:40:37
kafka历史数据清理策略以及配置
MySQL数据库增量备份的操作

← kafka历史数据清理策略以及配置 MySQL数据库增量备份的操作→

最近更新
01
记录二五年五一之短暂回归家庭
05-09
02
学习周刊-总第210期-2025年第19周
05-09
03
学习周刊-总第209期-2025年第18周
05-03
更多文章>
Theme by Vdoing | Copyright © 2017-2025 | 点击查看十年之约 | 浙ICP备18057030号
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式