conduktor.io ↗

Kafka CreatePartitions Response Wire Format v3 — 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 · flexible
message_size int32 · 4B
correlation_id int32 · 4B
tagged var
CreatePartitionsResponse v3
ThrottleTimeMs int32 · 4B
Results array
tagged var
Name string (compact)
ErrorCode int16 · 2B
ErrorMessage? string (compact)
tagged var

Schema & Example

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