What is ListGroups?
Enumerates all consumer groups known to a broker, used by kafka-consumer-groups.sh --list. Each broker only knows about groups it coordinates, so you must query all brokers for the complete picture (AdminClient does this automatically).
Wire Diagram
Response Header
message_size
int32 · 4B
correlation_id
int32 · 4B
ListGroupsResponse v0
ErrorCode
int16 · 2B
GroupId
string
ProtocolType
string
Schema & Example
Schema { "ErrorCode": int16, "Groups": [{ "GroupId": string, "ProtocolType": string }] }
Example { "ErrorCode": 0, "Groups": [{ "GroupId": "order-processors", "ProtocolType": "consumer" }] }