conduktor.io ↗

Kafka CreateTopics Response Wire Format v5 — Binary Protocol Layout

What is CreateTopics?

Provisions new topics via kafka-topics.sh --create or AdminClient.createTopics(). The validateOnly flag lets CI pipelines check if a topic config is valid without creating it; NOT_CONTROLLER errors mean the request hit a non-controller broker and will be auto-retried.

Related Errors

INVALID_PARTITIONS · INVALID_REPLICATION_FACTOR · NOT_CONTROLLER · POLICY_VIOLATION · THROTTLING_QUOTA_EXCEEDED · TOPIC_ALREADY_EXISTS

Wire Diagram

Response Header · flexible
message_size int32 · 4B
correlation_id int32 · 4B
tagged var
CreateTopicsResponse v5
ThrottleTimeMs int32 · 4B
Topics array
tagged var
Name string (compact)
ErrorCode int16 · 2B
ErrorMessage? string (compact)
TopicConfigErrorCode int16 · 2B
NumPartitions int32 · 4B
ReplicationFactor int16 · 2B
Configs? array
tagged var
Name string (compact)
Value? string (compact)
ReadOnly bool · 1B
ConfigSource int8 · 1B
IsSensitive bool · 1B
tagged var

Schema & Example

Schema
{
  "ThrottleTimeMs": int32,
  "Topics": [{
      "Name": string,
      "ErrorCode": int16,
      "ErrorMessage": string?,
      "TopicConfigErrorCode": int16,
      "NumPartitions": int32,
      "ReplicationFactor": int16,
      "Configs": [{
          "Name": string,
          "Value": string?,
          "ReadOnly": bool,
          "ConfigSource": int8,
          "IsSensitive": bool
      }]?
  }]
}
Example
{
  "ThrottleTimeMs": 0,
  "Topics": [{
      "Name": "orders",
      "ErrorCode": 0,
      "ErrorMessage": "NETWORK_EXCEPTION",
      "TopicConfigErrorCode": 1,
      "NumPartitions": 0,
      "ReplicationFactor": 1,
      "Configs": [{
          "Name": "orders",
          "Value": "604800000",
          "ReadOnly": false,
          "ConfigSource": 4,
          "IsSensitive": false
      }]?
  }]
}