conduktor.io ↗

Kafka Envelope Response Wire Format v0 — Binary Protocol Layout

What is Envelope?

Brokers use this to forward client requests to the KRaft controller while preserving the original client's identity for authorization. When a broker proxies a CreateTopics request to the controller, the ACL check uses the actual client's principal, not the broker's.

Wire Diagram

Response Header · flexible
message_size int32 · 4B
correlation_id int32 · 4B
tagged var
EnvelopeResponse v0
ResponseData? bytes (compact)
ErrorCode int16 · 2B
tagged var

Schema & Example

Schema
{
  "ResponseData": bytes?,
  "ErrorCode": int16
}
Example
{
  "ResponseData": "<binary>",
  "ErrorCode": 0
}