Api Keys

The following are the numeric codes that the ApiKey in the request can take for each of the above request types.

Name Key
Produce0
Fetch1
Offsets2
Metadata3
LeaderAndIsr4
StopReplica5
UpdateMetadata6
ControlledShutdown7
OffsetCommit8
OffsetFetch9
GroupCoordinator10
JoinGroup11
Heartbeat12
LeaveGroup13
SyncGroup14
DescribeGroups15
ListGroups16

Error Codes

We use numeric codes to indicate what problem occurred on the server. These can be translated by the client into exceptions or whatever the appropriate error handling mechanism in the client language. Here is a table of the error codes currently in use:

Error Code Retriable Description
UNKNOWN-1FalseThe server experienced an unexpected error when processing the request
NONE0False
OFFSET_OUT_OF_RANGE1FalseThe requested offset is not within the range of offsets maintained by the server.
CORRUPT_MESSAGE2TrueThis message has failed its CRC checksum, exceeds the valid size, or is otherwise corrupt.
UNKNOWN_TOPIC_OR_PARTITION3TrueThis server does not host this topic-partition.
INVALID_FETCH_SIZE4FalseThe requested fetch size is invalid.
LEADER_NOT_AVAILABLE5TrueThere is no leader for this topic-partition as we are in the middle of a leadership election.
NOT_LEADER_FOR_PARTITION6TrueThis server is not the leader for that topic-partition.
REQUEST_TIMED_OUT7TrueThe request timed out.
BROKER_NOT_AVAILABLE8FalseThe broker is not available.
REPLICA_NOT_AVAILABLE9FalseThe replica is not available for the requested topic-partition
MESSAGE_TOO_LARGE10FalseThe request included a message larger than the max message size the server will accept.
STALE_CONTROLLER_EPOCH11FalseThe controller moved to another broker.
OFFSET_METADATA_TOO_LARGE12FalseThe metadata field of the offset request was too large.
NETWORK_EXCEPTION13TrueThe server disconnected before a response was received.
GROUP_LOAD_IN_PROGRESS14TrueThe coordinator is loading and hence can't process requests for this group.
GROUP_COORDINATOR_NOT_AVAILABLE15TrueThe group coordinator is not available.
NOT_COORDINATOR_FOR_GROUP16TrueThis is not the correct coordinator for this group.
INVALID_TOPIC_EXCEPTION17FalseThe request attempted to perform an operation on an invalid topic.
RECORD_LIST_TOO_LARGE18FalseThe request included message batch larger than the configured segment size on the server.
NOT_ENOUGH_REPLICAS19TrueMessages are rejected since there are fewer in-sync replicas than required.
NOT_ENOUGH_REPLICAS_AFTER_APPEND20TrueMessages are written to the log, but to fewer in-sync replicas than required.
INVALID_REQUIRED_ACKS21FalseProduce request specified an invalid value for required acks.
ILLEGAL_GENERATION22FalseSpecified group generation id is not valid.
INCONSISTENT_GROUP_PROTOCOL23FalseThe group member's supported protocols are incompatible with those of existing members.
INVALID_GROUP_ID24FalseThe configured groupId is invalid
UNKNOWN_MEMBER_ID25FalseThe coordinator is not aware of this member.
INVALID_SESSION_TIMEOUT26FalseThe session timeout is not within an acceptable range.
REBALANCE_IN_PROGRESS27FalseThe group is rebalancing, so a rejoin is needed.
INVALID_COMMIT_OFFSET_SIZE28FalseThe committing offset data size is not valid
TOPIC_AUTHORIZATION_FAILED29FalseNot authorized to access topics: [Topic authorization failed.]
GROUP_AUTHORIZATION_FAILED30FalseNot authorized to access group: Group authorization failed.
CLUSTER_AUTHORIZATION_FAILED31FalseCluster authorization failed.
INVALID_TIMESTAMP32FalseThe timestamp of the message is out of acceptable range.

Headers:

Request Header => api_key api_version correlation_id client_id 
  api_key => INT16
  api_version => INT16
  correlation_id => INT32
  client_id => NULLABLE_STRING
Response Header => correlation_id 
  correlation_id => INT32

Produce API (Key: 0):

Requests:

Produce Request (Version: 0) => acks timeout [topic_data] 
  topic_data => topic [data] 
    data => partition record_set 
      partition => INT32
      record_set => BYTES
    topic => STRING
  acks => INT16
  timeout => INT32
Field Description
acksThe number of nodes that should replicate the produce before returning. -1 indicates the full ISR.
timeoutThe time to await a response in ms.
topic_data
topic
data
partition
record_set

Produce Request (Version: 1) => acks timeout [topic_data] 
  topic_data => topic [data] 
    data => partition record_set 
      partition => INT32
      record_set => BYTES
    topic => STRING
  acks => INT16
  timeout => INT32
Field Description
acksThe number of nodes that should replicate the produce before returning. -1 indicates the full ISR.
timeoutThe time to await a response in ms.
topic_data
topic
data
partition
record_set

Produce Request (Version: 2) => acks timeout [topic_data] 
  topic_data => topic [data] 
    data => partition record_set 
      partition => INT32
      record_set => BYTES
    topic => STRING
  acks => INT16
  timeout => INT32
Field Description
acksThe number of nodes that should replicate the produce before returning. -1 indicates the full ISR.
timeoutThe time to await a response in ms.
topic_data
topic
data
partition
record_set

Responses:

Produce Response (Version: 0) => [responses] 
  responses => topic [partition_responses] 
    partition_responses => partition error_code base_offset 
      partition => INT32
      error_code => INT16
      base_offset => INT64
    topic => STRING
Field Description
acksThe number of nodes that should replicate the produce before returning. -1 indicates the full ISR.
timeoutThe time to await a response in ms.
topic_data
topic
data
partition
record_set

Produce Response (Version: 1) => [responses] throttle_time_ms 
  responses => topic [partition_responses] 
    partition_responses => partition error_code base_offset 
      partition => INT32
      error_code => INT16
      base_offset => INT64
    topic => STRING
  throttle_time_ms => INT32
Field Description
acksThe number of nodes that should replicate the produce before returning. -1 indicates the full ISR.
timeoutThe time to await a response in ms.
topic_data
topic
data
partition
record_set

Produce Response (Version: 2) => [responses] throttle_time_ms 
  responses => topic [partition_responses] 
    partition_responses => partition error_code base_offset timestamp 
      partition => INT32
      error_code => INT16
      base_offset => INT64
      timestamp => INT64
    topic => STRING
  throttle_time_ms => INT32
Field Description
acksThe number of nodes that should replicate the produce before returning. -1 indicates the full ISR.
timeoutThe time to await a response in ms.
topic_data
topic
data
partition
record_set

Fetch API (Key: 1):

Requests:

Fetch Request (Version: 0) => replica_id max_wait_time min_bytes [topics] 
  topics => topic [partitions] 
    partitions => partition fetch_offset max_bytes 
      partition => INT32
      fetch_offset => INT64
      max_bytes => INT32
    topic => STRING
  replica_id => INT32
  max_wait_time => INT32
  min_bytes => INT32
Field Description
replica_idBroker id of the follower. For normal consumers, use -1.
max_wait_timeMaximum time in ms to wait for the response.
min_bytesMinimum bytes to accumulate in the response.
topicsTopics to fetch.
topicTopic to fetch.
partitionsPartitions to fetch.
partitionTopic partition id.
fetch_offsetMessage offset.
max_bytesMaximum bytes to fetch.

Fetch Request (Version: 1) => replica_id max_wait_time min_bytes [topics] 
  topics => topic [partitions] 
    partitions => partition fetch_offset max_bytes 
      partition => INT32
      fetch_offset => INT64
      max_bytes => INT32
    topic => STRING
  replica_id => INT32
  max_wait_time => INT32
  min_bytes => INT32
Field Description
replica_idBroker id of the follower. For normal consumers, use -1.
max_wait_timeMaximum time in ms to wait for the response.
min_bytesMinimum bytes to accumulate in the response.
topicsTopics to fetch.
topicTopic to fetch.
partitionsPartitions to fetch.
partitionTopic partition id.
fetch_offsetMessage offset.
max_bytesMaximum bytes to fetch.

Fetch Request (Version: 2) => replica_id max_wait_time min_bytes [topics] 
  topics => topic [partitions] 
    partitions => partition fetch_offset max_bytes 
      partition => INT32
      fetch_offset => INT64
      max_bytes => INT32
    topic => STRING
  replica_id => INT32
  max_wait_time => INT32
  min_bytes => INT32
Field Description
replica_idBroker id of the follower. For normal consumers, use -1.
max_wait_timeMaximum time in ms to wait for the response.
min_bytesMinimum bytes to accumulate in the response.
topicsTopics to fetch.
topicTopic to fetch.
partitionsPartitions to fetch.
partitionTopic partition id.
fetch_offsetMessage offset.
max_bytesMaximum bytes to fetch.

Responses:

Fetch Response (Version: 0) => [responses] 
  responses => topic [partition_responses] 
    partition_responses => partition error_code high_watermark record_set 
      partition => INT32
      error_code => INT16
      high_watermark => INT64
      record_set => BYTES
    topic => STRING
Field Description
replica_idBroker id of the follower. For normal consumers, use -1.
max_wait_timeMaximum time in ms to wait for the response.
min_bytesMinimum bytes to accumulate in the response.
topicsTopics to fetch.
topicTopic to fetch.
partitionsPartitions to fetch.
partitionTopic partition id.
fetch_offsetMessage offset.
max_bytesMaximum bytes to fetch.

Fetch Response (Version: 1) => throttle_time_ms [responses] 
  responses => topic [partition_responses] 
    partition_responses => partition error_code high_watermark record_set 
      partition => INT32
      error_code => INT16
      high_watermark => INT64
      record_set => BYTES
    topic => STRING
  throttle_time_ms => INT32
Field Description
replica_idBroker id of the follower. For normal consumers, use -1.
max_wait_timeMaximum time in ms to wait for the response.
min_bytesMinimum bytes to accumulate in the response.
topicsTopics to fetch.
topicTopic to fetch.
partitionsPartitions to fetch.
partitionTopic partition id.
fetch_offsetMessage offset.
max_bytesMaximum bytes to fetch.

Fetch Response (Version: 2) => throttle_time_ms [responses] 
  responses => topic [partition_responses] 
    partition_responses => partition error_code high_watermark record_set 
      partition => INT32
      error_code => INT16
      high_watermark => INT64
      record_set => BYTES
    topic => STRING
  throttle_time_ms => INT32
Field Description
replica_idBroker id of the follower. For normal consumers, use -1.
max_wait_timeMaximum time in ms to wait for the response.
min_bytesMinimum bytes to accumulate in the response.
topicsTopics to fetch.
topicTopic to fetch.
partitionsPartitions to fetch.
partitionTopic partition id.
fetch_offsetMessage offset.
max_bytesMaximum bytes to fetch.

Offsets API (Key: 2):

Requests:

Offsets Request (Version: 0) => replica_id [topics] 
  topics => topic [partitions] 
    partitions => partition timestamp max_num_offsets 
      partition => INT32
      timestamp => INT64
      max_num_offsets => INT32
    topic => STRING
  replica_id => INT32
Field Description
replica_idBroker id of the follower. For normal consumers, use -1.
topicsTopics to list offsets.
topicTopic to list offset.
partitionsPartitions to list offset.
partitionTopic partition id.
timestampTimestamp.
max_num_offsetsMaximum offsets to return.

Responses:

Offsets Response (Version: 0) => [responses] 
  responses => topic [partition_responses] 
    partition_responses => partition error_code [offsets] 
      partition => INT32
      error_code => INT16
    topic => STRING
Field Description
replica_idBroker id of the follower. For normal consumers, use -1.
topicsTopics to list offsets.
topicTopic to list offset.
partitionsPartitions to list offset.
partitionTopic partition id.
timestampTimestamp.
max_num_offsetsMaximum offsets to return.

Metadata API (Key: 3):

Requests:

Metadata Request (Version: 0) => [topics] 
Field Description
topicsAn array of topics to fetch metadata for. If no topics are specified fetch metadata for all topics.

Responses:

Metadata Response (Version: 0) => [brokers] [topic_metadata] 
  brokers => node_id host port 
    node_id => INT32
    host => STRING
    port => INT32
  topic_metadata => topic_error_code topic [partition_metadata] 
    partition_metadata => partition_error_code partition_id leader [replicas] [isr] 
      partition_error_code => INT16
      partition_id => INT32
      leader => INT32
    topic_error_code => INT16
    topic => STRING
Field Description
topicsAn array of topics to fetch metadata for. If no topics are specified fetch metadata for all topics.

LeaderAndIsr API (Key: 4):

Requests:

LeaderAndIsr Request (Version: 0) => controller_id controller_epoch [partition_states] [live_leaders] 
  partition_states => topic partition controller_epoch leader leader_epoch [isr] zk_version [replicas] 
    topic => STRING
    partition => INT32
    controller_epoch => INT32
    leader => INT32
    leader_epoch => INT32
    zk_version => INT32
  live_leaders => id host port 
    id => INT32
    host => STRING
    port => INT32
  controller_id => INT32
  controller_epoch => INT32
Field Description
controller_idThe controller id.
controller_epochThe controller epoch.
partition_states
topicTopic name.
partitionTopic partition id.
controller_epochThe controller epoch.
leaderThe broker id for the leader.
leader_epochThe leader epoch.
isrThe in sync replica ids.
zk_versionThe ZK version.
replicasThe replica ids.
live_leaders
idThe broker id.
hostThe hostname of the broker.
portThe port on which the broker accepts requests.

Responses:

LeaderAndIsr Response (Version: 0) => error_code [partitions] 
  partitions => topic partition error_code 
    topic => STRING
    partition => INT32
    error_code => INT16
  error_code => INT16
Field Description
controller_idThe controller id.
controller_epochThe controller epoch.
partition_states
topicTopic name.
partitionTopic partition id.
controller_epochThe controller epoch.
leaderThe broker id for the leader.
leader_epochThe leader epoch.
isrThe in sync replica ids.
zk_versionThe ZK version.
replicasThe replica ids.
live_leaders
idThe broker id.
hostThe hostname of the broker.
portThe port on which the broker accepts requests.

StopReplica API (Key: 5):

Requests:

StopReplica Request (Version: 0) => controller_id controller_epoch delete_partitions [partitions] 
  partitions => topic partition 
    topic => STRING
    partition => INT32
  controller_id => INT32
  controller_epoch => INT32
  delete_partitions => INT8
Field Description
controller_idThe controller id.
controller_epochThe controller epoch.
delete_partitionsBoolean which indicates if replica's partitions must be deleted.
partitions
topicTopic name.
partitionTopic partition id.

Responses:

StopReplica Response (Version: 0) => error_code [partitions] 
  partitions => topic partition error_code 
    topic => STRING
    partition => INT32
    error_code => INT16
  error_code => INT16
Field Description
controller_idThe controller id.
controller_epochThe controller epoch.
delete_partitionsBoolean which indicates if replica's partitions must be deleted.
partitions
topicTopic name.
partitionTopic partition id.

UpdateMetadata API (Key: 6):

Requests:

UpdateMetadata Request (Version: 0) => controller_id controller_epoch [partition_states] [live_brokers] 
  partition_states => topic partition controller_epoch leader leader_epoch [isr] zk_version [replicas] 
    topic => STRING
    partition => INT32
    controller_epoch => INT32
    leader => INT32
    leader_epoch => INT32
    zk_version => INT32
  live_brokers => id host port 
    id => INT32
    host => STRING
    port => INT32
  controller_id => INT32
  controller_epoch => INT32
Field Description
controller_idThe controller id.
controller_epochThe controller epoch.
partition_states
topicTopic name.
partitionTopic partition id.
controller_epochThe controller epoch.
leaderThe broker id for the leader.
leader_epochThe leader epoch.
isrThe in sync replica ids.
zk_versionThe ZK version.
replicasThe replica ids.
live_brokers
idThe broker id.
hostThe hostname of the broker.
portThe port on which the broker accepts requests.

UpdateMetadata Request (Version: 1) => controller_id controller_epoch [partition_states] [live_brokers] 
  partition_states => topic partition controller_epoch leader leader_epoch [isr] zk_version [replicas] 
    topic => STRING
    partition => INT32
    controller_epoch => INT32
    leader => INT32
    leader_epoch => INT32
    zk_version => INT32
  live_brokers => id [end_points] 
    end_points => port host security_protocol_type 
      port => INT32
      host => STRING
      security_protocol_type => INT16
    id => INT32
  controller_id => INT32
  controller_epoch => INT32
Field Description
controller_idThe controller id.
controller_epochThe controller epoch.
partition_states
topicTopic name.
partitionTopic partition id.
controller_epochThe controller epoch.
leaderThe broker id for the leader.
leader_epochThe leader epoch.
isrThe in sync replica ids.
zk_versionThe ZK version.
replicasThe replica ids.
live_brokers
idThe broker id.
end_points
portThe port on which the broker accepts requests.
hostThe hostname of the broker.
security_protocol_typeThe security protocol type.

Responses:

UpdateMetadata Response (Version: 0) => error_code 
  error_code => INT16
Field Description
controller_idThe controller id.
controller_epochThe controller epoch.
partition_states
topicTopic name.
partitionTopic partition id.
controller_epochThe controller epoch.
leaderThe broker id for the leader.
leader_epochThe leader epoch.
isrThe in sync replica ids.
zk_versionThe ZK version.
replicasThe replica ids.
live_brokers
idThe broker id.
hostThe hostname of the broker.
portThe port on which the broker accepts requests.

UpdateMetadata Response (Version: 1) => error_code 
  error_code => INT16
Field Description
controller_idThe controller id.
controller_epochThe controller epoch.
partition_states
topicTopic name.
partitionTopic partition id.
controller_epochThe controller epoch.
leaderThe broker id for the leader.
leader_epochThe leader epoch.
isrThe in sync replica ids.
zk_versionThe ZK version.
replicasThe replica ids.
live_brokers
idThe broker id.
end_points
portThe port on which the broker accepts requests.
hostThe hostname of the broker.
security_protocol_typeThe security protocol type.

ControlledShutdown API (Key: 7):

Requests:

ControlledShutdown Request (Version: 1) => broker_id 
  broker_id => INT32
Field Description
broker_idThe id of the broker for which controlled shutdown has been requested.

Responses:

ControlledShutdown Response (Version: 1) => error_code [partitions_remaining] 
  partitions_remaining => topic partition 
    topic => STRING
    partition => INT32
  error_code => INT16
Field Description
broker_idThe id of the broker for which controlled shutdown has been requested.

OffsetCommit API (Key: 8):

Requests:

OffsetCommit Request (Version: 0) => group_id [topics] 
  topics => topic [partitions] 
    partitions => partition offset metadata 
      partition => INT32
      offset => INT64
      metadata => STRING
    topic => STRING
  group_id => STRING
Field Description
group_idThe group id.
topicsTopics to commit offsets.
topicTopic to commit.
partitionsPartitions to commit offsets.
partitionTopic partition id.
offsetMessage offset to be committed.
metadataAny associated metadata the client wants to keep.

OffsetCommit Request (Version: 1) => group_id group_generation_id member_id [topics] 
  topics => topic [partitions] 
    partitions => partition offset timestamp metadata 
      partition => INT32
      offset => INT64
      timestamp => INT64
      metadata => STRING
    topic => STRING
  group_id => STRING
  group_generation_id => INT32
  member_id => STRING
Field Description
group_idThe group id.
group_generation_idThe generation of the group.
member_idThe member id assigned by the group coordinator.
topicsTopics to commit offsets.
topicTopic to commit.
partitionsPartitions to commit offsets.
partitionTopic partition id.
offsetMessage offset to be committed.
timestampTimestamp of the commit
metadataAny associated metadata the client wants to keep.

OffsetCommit Request (Version: 2) => group_id group_generation_id member_id retention_time [topics] 
  topics => topic [partitions] 
    partitions => partition offset metadata 
      partition => INT32
      offset => INT64
      metadata => STRING
    topic => STRING
  group_id => STRING
  group_generation_id => INT32
  member_id => STRING
  retention_time => INT64
Field Description
group_idThe group id.
group_generation_idThe generation of the consumer group.
member_idThe consumer id assigned by the group coordinator.
retention_timeTime period in ms to retain the offset.
topicsTopics to commit offsets.
topicTopic to commit.
partitionsPartitions to commit offsets.
partitionTopic partition id.
offsetMessage offset to be committed.
metadataAny associated metadata the client wants to keep.

Responses:

OffsetCommit Response (Version: 0) => [responses] 
  responses => topic [partition_responses] 
    partition_responses => partition error_code 
      partition => INT32
      error_code => INT16
    topic => STRING
Field Description
group_idThe group id.
topicsTopics to commit offsets.
topicTopic to commit.
partitionsPartitions to commit offsets.
partitionTopic partition id.
offsetMessage offset to be committed.
metadataAny associated metadata the client wants to keep.

OffsetCommit Response (Version: 1) => [responses] 
  responses => topic [partition_responses] 
    partition_responses => partition error_code 
      partition => INT32
      error_code => INT16
    topic => STRING
Field Description
group_idThe group id.
group_generation_idThe generation of the group.
member_idThe member id assigned by the group coordinator.
topicsTopics to commit offsets.
topicTopic to commit.
partitionsPartitions to commit offsets.
partitionTopic partition id.
offsetMessage offset to be committed.
timestampTimestamp of the commit
metadataAny associated metadata the client wants to keep.

OffsetCommit Response (Version: 2) => [responses] 
  responses => topic [partition_responses] 
    partition_responses => partition error_code 
      partition => INT32
      error_code => INT16
    topic => STRING
Field Description
group_idThe group id.
group_generation_idThe generation of the consumer group.
member_idThe consumer id assigned by the group coordinator.
retention_timeTime period in ms to retain the offset.
topicsTopics to commit offsets.
topicTopic to commit.
partitionsPartitions to commit offsets.
partitionTopic partition id.
offsetMessage offset to be committed.
metadataAny associated metadata the client wants to keep.

OffsetFetch API (Key: 9):

Requests:

OffsetFetch Request (Version: 0) => group_id [topics] 
  topics => topic [partitions] 
    partitions => partition 
      partition => INT32
    topic => STRING
  group_id => STRING
Field Description
group_idThe consumer group id.
topicsTopics to fetch offsets.
topicTopic to fetch offset.
partitionsPartitions to fetch offsets.
partitionTopic partition id.

OffsetFetch Request (Version: 1) => group_id [topics] 
  topics => topic [partitions] 
    partitions => partition 
      partition => INT32
    topic => STRING
  group_id => STRING
Field Description
group_idThe consumer group id.
topicsTopics to fetch offsets.
topicTopic to fetch offset.
partitionsPartitions to fetch offsets.
partitionTopic partition id.

Responses:

OffsetFetch Response (Version: 0) => [responses] 
  responses => topic [partition_responses] 
    partition_responses => partition offset metadata error_code 
      partition => INT32
      offset => INT64
      metadata => STRING
      error_code => INT16
    topic => STRING
Field Description
group_idThe consumer group id.
topicsTopics to fetch offsets.
topicTopic to fetch offset.
partitionsPartitions to fetch offsets.
partitionTopic partition id.

OffsetFetch Response (Version: 1) => [responses] 
  responses => topic [partition_responses] 
    partition_responses => partition offset metadata error_code 
      partition => INT32
      offset => INT64
      metadata => STRING
      error_code => INT16
    topic => STRING
Field Description
group_idThe consumer group id.
topicsTopics to fetch offsets.
topicTopic to fetch offset.
partitionsPartitions to fetch offsets.
partitionTopic partition id.

GroupCoordinator API (Key: 10):

Requests:

GroupCoordinator Request (Version: 0) => group_id 
  group_id => STRING
Field Description
group_idThe unique group id.

Responses:

GroupCoordinator Response (Version: 0) => error_code coordinator 
  coordinator => node_id host port 
    node_id => INT32
    host => STRING
    port => INT32
  error_code => INT16
Field Description
group_idThe unique group id.

JoinGroup API (Key: 11):

Requests:

JoinGroup Request (Version: 0) => group_id session_timeout member_id protocol_type [group_protocols] 
  group_protocols => protocol_name protocol_metadata 
    protocol_name => STRING
    protocol_metadata => BYTES
  group_id => STRING
  session_timeout => INT32
  member_id => STRING
  protocol_type => STRING
Field Description
group_idThe group id.
session_timeoutThe coordinator considers the consumer dead if it receives no heartbeat after this timeout in ms.
member_idThe assigned consumer id or an empty string for a new consumer.
protocol_typeUnique name for class of protocols implemented by group
group_protocolsList of protocols that the member supports
protocol_name
protocol_metadata

Responses:

JoinGroup Response (Version: 0) => error_code generation_id group_protocol leader_id member_id [members] 
  members => member_id member_metadata 
    member_id => STRING
    member_metadata => BYTES
  error_code => INT16
  generation_id => INT32
  group_protocol => STRING
  leader_id => STRING
  member_id => STRING
Field Description
group_idThe group id.
session_timeoutThe coordinator considers the consumer dead if it receives no heartbeat after this timeout in ms.
member_idThe assigned consumer id or an empty string for a new consumer.
protocol_typeUnique name for class of protocols implemented by group
group_protocolsList of protocols that the member supports
protocol_name
protocol_metadata

Heartbeat API (Key: 12):

Requests:

Heartbeat Request (Version: 0) => group_id group_generation_id member_id 
  group_id => STRING
  group_generation_id => INT32
  member_id => STRING
Field Description
group_idThe group id.
group_generation_idThe generation of the group.
member_idThe member id assigned by the group coordinator.

Responses:

Heartbeat Response (Version: 0) => error_code 
  error_code => INT16
Field Description
group_idThe group id.
group_generation_idThe generation of the group.
member_idThe member id assigned by the group coordinator.

LeaveGroup API (Key: 13):

Requests:

LeaveGroup Request (Version: 0) => group_id member_id 
  group_id => STRING
  member_id => STRING
Field Description
group_idThe group id.
member_idThe member id assigned by the group coordinator.

Responses:

LeaveGroup Response (Version: 0) => error_code 
  error_code => INT16
Field Description
group_idThe group id.
member_idThe member id assigned by the group coordinator.

SyncGroup API (Key: 14):

Requests:

SyncGroup Request (Version: 0) => group_id generation_id member_id [group_assignment] 
  group_assignment => member_id member_assignment 
    member_id => STRING
    member_assignment => BYTES
  group_id => STRING
  generation_id => INT32
  member_id => STRING
Field Description
group_id
generation_id
member_id
group_assignment
member_id
member_assignment

Responses:

SyncGroup Response (Version: 0) => error_code member_assignment 
  error_code => INT16
  member_assignment => BYTES
Field Description
group_id
generation_id
member_id
group_assignment
member_id
member_assignment

DescribeGroups API (Key: 15):

Requests:

DescribeGroups Request (Version: 0) => [group_ids] 
Field Description
group_idsList of groupIds to request metadata for (an empty groupId array will return empty group metadata).

Responses:

DescribeGroups Response (Version: 0) => [groups] 
  groups => error_code group_id state protocol_type protocol [members] 
    members => member_id client_id client_host member_metadata member_assignment 
      member_id => STRING
      client_id => STRING
      client_host => STRING
      member_metadata => BYTES
      member_assignment => BYTES
    error_code => INT16
    group_id => STRING
    state => STRING
    protocol_type => STRING
    protocol => STRING
Field Description
group_idsList of groupIds to request metadata for (an empty groupId array will return empty group metadata).

ListGroups API (Key: 16):

Requests:

ListGroups Request (Version: 0) => 
Field Description

Responses:

ListGroups Response (Version: 0) => error_code [groups] 
  groups => group_id protocol_type 
    group_id => STRING
    protocol_type => STRING
  error_code => INT16
Field Description