conduktor.io ↗

Kafka WriteShareGroupState Request Wire Format v0 — Binary Protocol Layout

What is WriteShareGroupState?

Durably persists delivery state updates after consumers acknowledge records. This write is on the critical path of ShareAcknowledge, so high latency here (slow disk on the coordinator broker) directly impacts acknowledgement throughput.

Related Errors

CLUSTER_AUTHORIZATION_FAILED · COORDINATOR_NOT_AVAILABLE

Wire Diagram

Request Header · flexible
message_size int32 · 4B
api_key int16 · 2B
api_version int16 · 2B
correlation_id int32 · 4B
client_id string (compact)
tagged var
WriteShareGroupStateRequest v0
GroupId string (compact)
Topics array
tagged var
TopicId uuid · 16B
Partitions array
tagged var
Partition int32 · 4B
StateEpoch int32 · 4B
LeaderEpoch int32 · 4B
StartOffset int64 · 8B
StateBatches array
tagged var
FirstOffset int64 · 8B
LastOffset int64 · 8B
DeliveryState int8 · 1B
DeliveryCount int16 · 2B
tagged var

Schema & Example

Schema
{
  "GroupId": string,
  "Topics": [{
      "TopicId": uuid,
      "Partitions": [{
          "Partition": int32,
          "StateEpoch": int32,
          "LeaderEpoch": int32,
          "StartOffset": int64,
          "StateBatches": [{
              "FirstOffset": int64,
              "LastOffset": int64,
              "DeliveryState": int8,
              "DeliveryCount": int16
          }]
      }]
  }]
}
Example
{
  "GroupId": "order-processors",
  "Topics": [{
      "TopicId": "550e8400-e29b-41d4-a716-446655440000",
      "Partitions": [{
          "Partition": 0,
          "StateEpoch": 12,
          "LeaderEpoch": 17,
          "StartOffset": 150382,
          "StateBatches": [{
              "FirstOffset": 150382,
              "LastOffset": 150382,
              "DeliveryState": 1,
              "DeliveryCount": 10
          }]
      }]
  }]
}