KIP-516 — topic identifiers
Status: partial — see the KIP index. Earlier planning documents listed this KIP as implemented; the 2026-07-19 source sweep corrected it.
What's missing
Wire propagation. The plumbing now reaches the broker: the
production topic watch (run_topic_watch in
crates/kaas-k8s/src/kube_watchers.rs) delivers status.topicId into
the broker's topic registry (TopicRegistry::set_topic_id), where it
backs the stale-directory identity gate (gh #241). But the ID is
deliberately kept in a side map rather than filled into
TopicMeta.topic_id — flipping Metadata from nil to real topic IDs is
this KIP's remaining call — so Metadata v10+ still serves nil topic
IDs for every topic, and clients fall back to name-based lookups.
CreateTopics v7+ returning the UUID in its response is likewise open.
What the KIP changes in Apache Kafka
KIP-516 gives every topic an immutable UUID alongside its name, closing the delete-and-recreate ambiguity: a fetcher or metadata cache holding the old topic's ID can tell it apart from the re-created namesake. Requests and responses grew topic-ID fields from Metadata v10 / Fetch v13 onward.
What kaas has
The identity half, operator-side and durable:
- The
KafkaTopiccontroller (crates/kaas-operator-controllers/src/kafkatopic_controller.rs) mints a cryptographically random v4 UUID intoStatus.TopicIDon first reconcile and never rotates it — a re-created topic gets a distinct ID, exactly Apache's contract.kubectl get kafkatopic -o yamlshows it. - The broker's topic registry (
crates/kaas-broker/src/topic_registry.rs) carries a 16-bytetopic_idper topic and the Metadata handler encodes it — today always the all-zero value, which the protocol defines as the "no topic ID" sentinel, so clients degrade gracefully rather than misbehave.
Because kaas serves Fetch v4–v12 (matrix) — below the v13 topic-ID cutover — the Fetch path never needs an ID, which is why the gap is invisible to normal produce/consume traffic.
How the partial state is verified
Operator-side minting and non-rotation are covered by the kafkatopic
controller's reconcile tests; the wire-side sentinel is pinned by the
Metadata handler's unit tests (crates/kaas-broker/src/handlers/metadata.rs).
The gap itself is explicit: every TopicMeta insertion in
bins/kaas/src/main.rs writes topic_id: [0u8; 16].