conduktor.io ↗

Kafka AllocateProducerIds Response Wire Format v0 — Binary Protocol Layout

What is AllocateProducerIds?

Brokers request a batch of producer IDs from the KRaft controller, which maintains the global monotonically increasing counter. In KRaft mode, all producer ID allocation goes through this API, ensuring no two brokers hand out the same ID.

Wire Diagram

Response Header · flexible
message_size int32 · 4B
correlation_id int32 · 4B
tagged var
AllocateProducerIdsResponse v0
ThrottleTimeMs int32 · 4B
ErrorCode int16 · 2B
ProducerIdStart int64 · 8B
ProducerIdLen int32 · 4B
tagged var

Schema & Example

Schema
{
  "ThrottleTimeMs": int32,
  "ErrorCode": int16,
  "ProducerIdStart": int64,
  "ProducerIdLen": int32
}
Example
{
  "ThrottleTimeMs": 0,
  "ErrorCode": 0,
  "ProducerIdStart": 0,
  "ProducerIdLen": 1
}