You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "James Cheng (JIRA)" <ji...@apache.org> on 2017/12/08 09:07:00 UTC

[jira] [Commented] (KAFKA-6314) Add a tool to delete consumer offsets for a given group

    [ https://issues.apache.org/jira/browse/KAFKA-6314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16283235#comment-16283235 ] 

James Cheng commented on KAFKA-6314:
------------------------------------

FYI, kafka-consumer-groups.sh already has --delete support, but it only works for zookeeper-based offsets. 
{noformat}
$ ~/kafka_2.11-1.0.0/bin/kafka-consumer-groups.sh
List all consumer groups, describe a consumer group, delete consumer group info, or reset consumer group offsets.
Option                                  Description
------                                  -----------
--delete                                Pass in groups to delete topic
                                          partition offsets and ownership
                                          information over the entire consumer
                                          group. For instance --group g1 --
                                          group g2
                                        Pass in groups with a single topic to
                                          just delete the given topic's
                                          partition offsets and ownership
                                          information for the given consumer
                                          groups. For instance --group g1 --
                                          group g2 --topic t1
                                        Pass in just a topic to delete the
                                          given topic's partition offsets and
                                          ownership information for every
                                          consumer group. For instance --topic
                                          t1
                                        WARNING: Group deletion only works for
                                          old ZK-based consumer groups, and
                                          one has to use it carefully to only
                                          delete groups that are not active.
{noformat}

So this JIRA should say that the RFE is to let us delete kafka-based offsets.

> Add a tool to delete consumer offsets for a given group
> -------------------------------------------------------
>
>                 Key: KAFKA-6314
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6314
>             Project: Kafka
>          Issue Type: New Feature
>          Components: consumer, core, tools
>            Reporter: Tom Scott
>            Priority: Minor
>
> Add a tool to delete consumer offsets for a given group similar to the reset tool. It could look something like this:
> kafka-consumer-groups --bootstrap-server localhost:9092 --delete-offsets --group somegroup
> The case for this is as follows:
> 1. Consumer group with id: group1 subscribes to topic1
> 2. The group is stopped 
> 3. The subscription changed to topic2 but the id is kept as group1
> Now the out output of kafka-consumer-groups --describe for the group will show topic1 even though the group is not subscribed to that topic. This is bad for monitoring as it will show lag on topic1.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)