DescribeGroups
This page encodes the smallest legal instance of the request and the response: numeric fields are zero, strings and byte arrays are empty, every array carries exactly one sample element, and any records field holds one empty 61-byte RecordBatch v2. Version 6 is a flexible version, so every struct is terminated by a uvarint tagged-field count and strings and arrays carry compact length-plus-one prefixes. Sizes below include the leading int32 size prefix.
- API key
- 15
- Encoded at
- v6
- Flexible versions
- 5+
- Headers
- req v2, resp v1
- Request versions
- 0-6
- Response versions
- 0-6
- Request size
- 19 bytes
- Response size
- 35 bytes
framerpc headerrequest bodyRecordBatchRecordresponse bodytagged_fields
Request
DescribeGroupsRequest v6, request header v2, 19 bytes on the wire
byte layout (19 bytes, 16 bytes per row)
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0010
object tree
DescribeGroupsRequest message v6 [0x0000, 19B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 15 [0x0000, 4B] number of bytes that follow, patched after encoding +-- RequestHeader v2 [0x0004, 11B] common request header | +-- request_api_key int16 = 15 (DescribeGroups) [0x0004, 2B] numeric id of the API being invoked | +-- request_api_version int16 = 6 [0x0006, 2B] version of the API being invoked | +-- correlation_id int32 = 0 [0x0008, 4B] echoed back by the broker in the response | +-- client_id nullable_string = "" (int16 len=0) [0x000c, 2B] always a non-flexible int16-prefixed string | +-- tagged_fields uvarint = 0 [0x000e, 1B] number of tagged fields in the header +-- DescribeGroupsRequest struct [0x000f, 4B] message body, version 6 +-- Groups []string = 1 element [0x000f, 2B] The names of the groups to describe. | +-- length uvarint = 2 (compact, n+1) [0x000f, 1B] one sample element follows | +-- string[0] string = "" (compact, len+1=1) [0x0010, 1B] +-- IncludeAuthorizedOperations bool = false [0x0011, 1B] Whether to include authorized operations. +-- tagged_fields uvarint = 0 [0x0012, 1B] number of tagged fields in this struct
kafka message schema (.json)
{ "apiKey": 15, "type": "request", "listeners": ["broker"], "name": "DescribeGroupsRequest", // Versions 1 and 2 are the same as version 0. // // Starting in version 3, authorized operations can be requested. // // Starting in version 4, the response will include group.instance.id info for members. // // Version 5 is the first flexible version. // // Version 6 returns error code GROUP_ID_NOT_FOUND if the group ID is not found (KIP-1043). "validVersions": "0-6", "flexibleVersions": "5+", "fields": [ { "name": "Groups", "type": "[]string", "versions": "0+", "entityType": "groupId", "about": "The names of the groups to describe." }, { "name": "IncludeAuthorizedOperations", "type": "bool", "versions": "3+", "about": "Whether to include authorized operations." } ] }
Response
DescribeGroupsResponse v6, response header v1, 35 bytes on the wire
byte layout (35 bytes, 16 bytes per row)
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0010
0020
object tree
DescribeGroupsResponse message v6 [0x0000, 35B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 31 [0x0000, 4B] number of bytes that follow, patched after encoding +-- ResponseHeader v1 [0x0004, 5B] common response header | +-- correlation_id int32 = 0 [0x0004, 4B] matches the correlation_id of the request | +-- tagged_fields uvarint = 0 [0x0008, 1B] number of tagged fields in the header +-- DescribeGroupsResponse struct [0x0009, 26B] message body, version 6 +-- ThrottleTimeMs int32 = 0 [0x0009, 4B] The duration in milliseconds for which the request was throttled due to a q... +-- Groups []DescribedGroup = 1 element [0x000d, 21B] Each described group. | +-- length uvarint = 2 (compact, n+1) [0x000d, 1B] one sample element follows | +-- DescribedGroup[0] DescribedGroup = struct [0x000e, 20B] | +-- ErrorCode int16 = 0 [0x000e, 2B] The describe error, or 0 if there was no error. | +-- ErrorMessage string = "" (compact, len+1=1) [0x0010, 1B] The describe error message, or null if there was no error. | +-- GroupId string = "" (compact, len+1=1) [0x0011, 1B] The group ID string. | +-- GroupState string = "" (compact, len+1=1) [0x0012, 1B] The group state string, or the empty string. | +-- ProtocolType string = "" (compact, len+1=1) [0x0013, 1B] The group protocol type, or the empty string. | +-- ProtocolData string = "" (compact, len+1=1) [0x0014, 1B] The group protocol data, or the empty string. | +-- Members []DescribedGroupMember = 1 element [0x0015, 8B] The group members. | | +-- length uvarint = 2 (compact, n+1) [0x0015, 1B] one sample element follows | | +-- DescribedGroupMember[0] DescribedGroupMember = struct [0x0016, 7B] | | +-- MemberId string = "" (compact, len+1=1) [0x0016, 1B] The member id. | | +-- GroupInstanceId string = "" (compact, len+1=1) [0x0017, 1B] The unique identifier of the consumer instance provided by end user. | | +-- ClientId string = "" (compact, len+1=1) [0x0018, 1B] The client ID used in the member's latest join group request. | | +-- ClientHost string = "" (compact, len+1=1) [0x0019, 1B] The client host. | | +-- MemberMetadata bytes = empty (compact, len+1=1) [0x001a, 1B] The metadata corresponding to the current group protocol in use. | | +-- MemberAssignment bytes = empty (compact, len+1=1) [0x001b, 1B] The current assignment provided by the group leader. | | +-- tagged_fields uvarint = 0 [0x001c, 1B] number of tagged fields in this struct | +-- AuthorizedOperations int32 = 0 [0x001d, 4B] 32-bit bitfield to represent authorized operations for this group. | +-- tagged_fields uvarint = 0 [0x0021, 1B] number of tagged fields in this struct +-- tagged_fields uvarint = 0 [0x0022, 1B] number of tagged fields in this struct
kafka message schema (.json)
{ "apiKey": 15, "type": "response", "name": "DescribeGroupsResponse", // Version 1 added throttle time. // // Starting in version 2, on quota violation, brokers send out responses before throttling. // // Starting in version 3, brokers can send authorized operations. // // Starting in version 4, the response will optionally include group.instance.id info for members. // // Version 5 is the first flexible version. // // Version 6 returns error code GROUP_ID_NOT_FOUND if the group ID is not found (KIP-1043). "validVersions": "0-6", "flexibleVersions": "5+", "fields": [ { "name": "ThrottleTimeMs", "type": "int32", "versions": "1+", "ignorable": true, "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." }, { "name": "Groups", "type": "[]DescribedGroup", "versions": "0+", "about": "Each described group.", "fields": [ { "name": "ErrorCode", "type": "int16", "versions": "0+", "about": "The describe error, or 0 if there was no error." }, { "name": "ErrorMessage", "type": "string", "versions": "6+", "nullableVersions": "6+", "default": "null", "about": "The describe error message, or null if there was no error." }, { "name": "GroupId", "type": "string", "versions": "0+", "entityType": "groupId", "about": "The group ID string." }, { "name": "GroupState", "type": "string", "versions": "0+", "about": "The group state string, or the empty string." }, { "name": "ProtocolType", "type": "string", "versions": "0+", "about": "The group protocol type, or the empty string." }, // ProtocolData is currently only filled in if the group state is in the Stable state. { "name": "ProtocolData", "type": "string", "versions": "0+", "about": "The group protocol data, or the empty string." }, // N.B. If the group is in the Dead state, the members array will always be empty. { "name": "Members", "type": "[]DescribedGroupMember", "versions": "0+", "about": "The group members.", "fields": [ { "name": "MemberId", "type": "string", "versions": "0+", "about": "The member id." }, { "name": "GroupInstanceId", "type": "string", "versions": "4+", "ignorable": true, "nullableVersions": "4+", "default": "null", "about": "The unique identifier of the consumer instance provided by end user." }, { "name": "ClientId", "type": "string", "versions": "0+", "about": "The client ID used in the member's latest join group request." }, { "name": "ClientHost", "type": "string", "versions": "0+", "about": "The client host." }, // This is currently only provided if the group is in the Stable state. { "name": "MemberMetadata", "type": "bytes", "versions": "0+", "about": "The metadata corresponding to the current group protocol in use." }, // This is currently only provided if the group is in the Stable state. { "name": "MemberAssignment", "type": "bytes", "versions": "0+", "about": "The current assignment provided by the group leader." } ]}, { "name": "AuthorizedOperations", "type": "int32", "versions": "3+", "default": "-2147483648", "about": "32-bit bitfield to represent authorized operations for this group." } ]} ] }