Versions Compared

Key

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

Table of Contents

Status

Current state: Under Discussion Adopted

Discussion thread: here

JIRA:

Jira
serverASF JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyKAFKA-5526

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

...

Code Block
languagetext
$ bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group my-group --members
Note: This will only show information about consumers that use the Java consumer API (non-ZooKeeper-based consumers).
CONSUMER-ID                                       HOST                           CLIENT-ID              #PARTITIONS     ASSIGNMENT-STRATEGY
consumer1-81fe8a2a-0b29-4964-a1d4-4741582132bb    /127.0.0.1                     consumer1              2
consumer2-db6f12f2-e1de-4bb7-93ec-6170fefa8830               range
consumer2-db6f12f2-e1de-4bb7-93ec-6170fefa8830    //127.0.0.1                     consumer2              1               range, round-robin
consumer7-c1d056fa-eabc-42ed-b557-c848f747ec49    /127.0.0.1                     consumer7              1               range

There is an additional --verbose switch that can be used along with this option to include additional details about each group member:

Code Block
languagetext
$ bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group my-group --members --verbose
Note: This will only show information about consumers that use the Java consumer API (non-ZooKeeper-based consumers).
CONSUMER-ID                                       HOST                           CLIENT-ID              #PARTITIONS     ASSIGNMENT-STRATEGY     SUBSCRIPTION        ASSIGNMENT
consumer1-81fe8a2a-
consumer1-81fe8a2a-0b29-4964-a1d4-4741582132bb    /127.0.0.1                     consumer1              2               range                   my-topic            my-topic(0,1)
consumer2-db6f12f2-e1de-4bb7-93ec-6170fefa8830    /127.0.0.1                     consumer2              1               range, round-robin      my-topic            my-topic(2(2)
consumer7-c1d056fa-eabc-42ed-b557-c848f747ec49    /127.0.0.1                     consumer7              1               range                   my-second-topic     my-second-topic(0)

–describe --offsets

...

The --state option, that can also be used with --describe only, reports the group level information that comes back in the response of DescribeGroups API call along with the coordinator id of the group:

Code Block
languagetext
$ bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group my-group --state
Note: This will only show information about consumers that use the Java consumer API (non-ZooKeeper-based consumers).
COORDINATOR (ID)       ASSIGNMENT-STRATEGY     STATE          #MEMBERS
localhost:9092 (0)     range                   Stable         3 

 

In the above outputs, the width of the following columns will be dynamically determined (as opposed to the fixed widths that have been applied so far):

  • TOPIC
  • CONSUMER-ID
  • HOST
  • CLIENT-ID
  • COORDINATOR (ID)

Compatibility, Deprecation, and Migration Plan

...