conduktor.io ↗

Kafka AllocateProducerIds Request 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

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
AllocateProducerIdsRequest v0
BrokerId int32 · 4B
BrokerEpoch int64 · 8B
tagged var

Schema & Example

Schema
{
  "BrokerId": int32,
  "BrokerEpoch": int64
}
Example
{
  "BrokerId": 1,
  "BrokerEpoch": 12
}