Versions Compared

Key

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

...

As far as describing a consumer group goes, the ConsumerGroupCommand currently lists all members of the group along with associated topic partitions and their committed offsets  all all in one view. For example:

...

This KIP suggests breaking down the command to cover each some of the information pieces above separately using additional switches. There are a couple of reasons behind this improvement:

  • The above output, with all the missing column values, looks weird and could be difficult to interpret. For a big group, where there are many consumers without assigned partition, or there are many partitions without a consumer, the command will output a long list, while the user may only be interested in, for example, active members only.
  • A user is typically interested in one of the information pieces above when issuing the command: either offset information, or members, or topic partitions associated with the group.

As part of this KIP, additional information about the group will also be generated that is currently missing. For example, generation id of the group, or the assignment policy used by each member. 

Public Interfaces

The change required for this includes updating the ConsumerGroupCommand tool:

  1. The output of --describe will change to return only rows for active consumers one row per topic partition in the group. This means that group members with assigned topic partitionsno assigned partition will not be present in the default output.
  2. A new switch --members will be introduced, that can only be provided along with --describe, to return a list of all active members of the group. For each member the number of assigned topic partitions (without any offset information) and the assignment strategy used by the member are also returned.
  3. A new switch --partitions will offsets will be introduced, that can only be provided along with --describe, that returns the same default output of --describe. I.e., this will be the default switch that can be additionally used with --describe.
  4. A new switch --state will be introduced, that can only be provided along with --describe, to return group-level status information that is returned from the DescribeGroups API call.
  5. A new switch --subscription will be introduced, that can only be provided along with --describe, to list the topics each member is subscribed to to return a list of all topic partitions with committed offsets in the group. For each topic partition, current offset, log end offset, and lag are also returned.

Proposed Changes

To describe the proposed changes let us revisit the example above. This KIP proposes to change the --describe option of the ConsumerGroupCommand according to the following:

...