Decouple topic/namespace/tenant names from internal identifiers in Pulsar #26303
AvaneeshPothuri
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
Pulsar uses the user-given name directly as the internal identifier
via the FQN (
persistent://tenant/namespace/topic). This name drives:This makes renaming impossible. Changing the name changes the hash,
changes the bundle, breaks broker routing.
Proposed idea
Pulsar generates stable internal IDs for tenant, namespace, and topic
on creation. The user-given name is stored as metadata (e.g. in the
managed ledger blob's
propertiesfield or equivalent).Flow:
txn-eventst3,ns7,tp42)persistent://t3/ns7/tp42— this is what drives hashingand ZK paths, never changes
txn-eventsis stored as display metadata againsttp42the ID back to the human name from metadata
Renaming
Renaming = update the name metadata on the ID. ID doesn't change,
hash doesn't change, broker assignment doesn't change. Zero disruption
to producers/consumers already connected.
Similarity to Kafka's KIP-516
Kafka introduced UUIDs as internal topic identifiers (KIP-516) for
similar reasons. This proposal takes it further — making the ID the
primary handle for users too, with names purely as display metadata.
Tradeoffs worth discussing
Is this acceptable UX or does Pulsar need a name→ID resolution
layer so users can still connect by name?
Questions for the community
(Closest I found: https://codingthestreams.com/pulsar/2022/10/21/possible-high-level-architecture.html
— proposes name→ID indirection internally, but as part of a larger rearchitecting effort)
All reactions