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.
Wire Diagram
Response Header
message_size
int32 · 4B
correlation_id
int32 · 4B
CreateTopicsResponse v2
ThrottleTimeMs
int32 · 4B
Name
string
ErrorCode
int16 · 2B
ErrorMessage?
string
Schema & Example
Schema { "ThrottleTimeMs": int32, "Topics": [{ "Name": string, "ErrorCode": int16, "ErrorMessage": string? }] }
Example { "ThrottleTimeMs": 0, "Topics": [{ "Name": "orders", "ErrorCode": 0, "ErrorMessage": "NETWORK_EXCEPTION" }] }