Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Status

Current state:  Under Discussion Accepted

Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]
 [DISCUSS] KIP-379: Multiple Consumer Group Management

Voting thread: [VOTE] KIP-379: Multiple Consumer Group Management

JIRAJIRA:

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyKAFKA-7471

PULL REQUEST: https://github.com/apache/kafka/pull/5726/#5726

Code Block
titlevotes
collapsetrue
Non-binding votes: 4 (Gwen Shapira, Ryanne Dolan, Jason Gustafson, Vahid Hashemian) 
Binding votes: 1 (Damian Guy)

Motivation

1) Running a set of commands like `--describe`, `--delete` or `--reset-offsets` for every single consumer group appears to be quite a tedios, time and memory consuming task. Each time you have to start a separate JVM to perform a query for a single group or spend some time writing your own client code. 

2) Quite often one would like to perform operations on all consumer groups, thus, it would be great to have something as like an `--all-groups` option, similar to `--all-topics`.  

3) In other cases, you would like to perform operations on a certain subset of consumer groups, thus, it would be great to have something as like a repeatable `--group` option for each group.   

4) Performing a Describe query on all consumer groups with a combination of options `--describe` and `--state` will state` would allow us to grep consumer groups by their state (like `Stable, Dead, Empty, PreparingRebalance, NonExisting`). The only thing we have to do is to extend the "results table" with a GROUP column. 

5) Support new New CSV file format to export consumer offsets for multiple groups.

Public Interfaces

1) Providing the command line tool kafka-consumer-groups.sh with support of repeating repeating --group parameter  parameter for operations --describe, --delete, --reset-offsets:

...

3) Extending data output table format by adding "GROUP" column  column for Describe queries:

--describe:

GROUP

TOPIC

PARTITION

CURRENT-OFFSET

LOG-END-OFFSET

LAGCONSUMER-IDHOSTCLIENT-IDGROUP

--describe --members:

GROUPCONSUMER-IDHOSTCLIENT-ID#PARTITIONSGROUP

--describe --members --verbose

GROUPCONSUMER-IDHOSTCLIENT-ID#PARTITIONSGROUPASSIGNMENT

--describe --state

GROUPCOORDINATOR (ID)ASSIGNMENT-STRATEGYSTATE#MEMBERSGROUP

4) Update Add new CSV file to support multiple consumer groups. Thus, we will have to update table format by adding a consumer group column. Backwards compatibility with old CSV file format should be preserved.  

New CSV file format:

GROUPTOPICPARTITIONOFFSET




Old CSV file format for a single group (leaving as is):

TOPICPARTITIONOFFSET



Proposed Changes

  • Providing the command line tool kafka-consumer-groups.sh with support of repeating --group parameter for operations operations --describe, --delete, --reset-offsets
  • Providing the command line tool kafka-consumer-groups.sh with an optional --all-groups parameter for operations operations --describe, --delete, --reset-offsets
  • Extending data output table format by adding "GROUP" column for all all --describe queries queries
  • Update CSV file to support multiple consumer groups.
  • We will also have to make sure CSV generation is done properly since there are no restrictions on consumer group names and symbols like commas and quotes are allowed. That is, CSV file generation with export/import of consumer offsets needs some rework

Compatibility, Deprecation, and Migration Plan

  • Positive impact on existing users
  • We are not changing behavior but adding new features
  • Support backwards compatibility with old CSV file format for a single group case

Rejected Alternatives

None.

...