What is ReadShareGroupState?
Recovers delivery state (acknowledged records, in-flight records) from durable storage after a coordinator failover. This is how share groups survive coordinator restarts without losing track of which records have been delivered.
Wire Diagram
Response Header · flexible
message_size
int32 · 4B
correlation_id
int32 · 4B
tagged
var
ReadShareGroupStateResponse v0
tagged
var
TopicId
uuid · 16B
tagged
var
Partition
int32 · 4B
ErrorCode
int16 · 2B
ErrorMessage?
string (compact)
StateEpoch
int32 · 4B
StartOffset
int64 · 8B
tagged
var
FirstOffset
int64 · 8B
LastOffset
int64 · 8B
DeliveryState
int8 · 1B
DeliveryCount
int16 · 2B
tagged
var
Schema & Example
Schema { "Results": [{ "TopicId": uuid, "Partitions": [{ "Partition": int32, "ErrorCode": int16, "ErrorMessage": string?, "StateEpoch": int32, "StartOffset": int64, "StateBatches": [{ "FirstOffset": int64, "LastOffset": int64, "DeliveryState": int8, "DeliveryCount": int16 }] }] }] }
Example { "Results": [{ "TopicId": "550e8400-e29b-41d4-a716-446655440000", "Partitions": [{ "Partition": 0, "ErrorCode": 0, "ErrorMessage": "NETWORK_EXCEPTION", "StateEpoch": 12, "StartOffset": 150382, "StateBatches": [{ "FirstOffset": 150382, "LastOffset": 150382, "DeliveryState": 1, "DeliveryCount": 10 }] }] }] }