lhotari commented on code in PR #25134: URL: https://github.com/apache/pulsar/pull/25134#discussion_r2689489077
########## pip/pip-452.md: ########## @@ -0,0 +1,245 @@ +# PIP-452: Customizable topic listing of namespace with properties + +# Motivation +Currently, the CommandGetTopicsOfNamespace logic in the Pulsar Broker is hard-coded to scan the metadata store (ZooKeeper) for all children nodes under a namespace. + +This implementation limits the flexibility required for complex multi-tenant scenarios: + +No Client Context: The broker cannot distinguish who is asking for the topics or why. It cannot filter topics based on client properties (these client properties may correspond to, or be derived from topic properties). + +Inefficient Filtering: For namespaces with millions of topics, the broker must fetch the full list into memory before applying the topics_pattern regex. There is no way to "push down" the filtering to the data source (e.g., a database with an index). + +To address these issues, I propose making the topic listing logic pluggable and extending the protocol to accept client properties. + +# Goals +Protocol: Add a properties field to `CommandGetTopicsOfNamespace` to carry client-side context. Review Comment: How about topic list watchers? There are `CommandWatchTopicList`, `CommandWatchTopicListSuccess` and `CommandWatchTopicUpdate` which would require properties support as well so that the solution would be consistent. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
