conduktor.io ↗

Kafka CreatePartitions Response Wire Format v1 — Binary Protocol Layout

What is CreatePartitions?

Increases a topic's partition count via kafka-topics.sh --alter --partitions. Partition count can only go up, never down. Adding partitions breaks message ordering for keys previously co-located on the same partition (key-based producers must rehash), so coordinate carefully.

Related Errors

INVALID_PARTITIONS · NOT_CONTROLLER

Wire Diagram

Response Header
message_size int32 · 4B
correlation_id int32 · 4B
CreatePartitionsResponse v1
ThrottleTimeMs int32 · 4B
Results array
Name string
ErrorCode int16 · 2B
ErrorMessage? string

Schema & Example

Schema
{
  "ThrottleTimeMs": int32,
  "Results": [{
      "Name": string,
      "ErrorCode": int16,
      "ErrorMessage": string?
  }]
}
Example
{
  "ThrottleTimeMs": 0,
  "Results": [{
      "Name": "orders",
      "ErrorCode": 0,
      "ErrorMessage": "NETWORK_EXCEPTION"
  }]
}