oneby-wang commented on issue #24310:
URL: https://github.com/apache/pulsar/issues/24310#issuecomment-3209003368
Hi, I just happen to read this part source code. TopicsPattern only works
for persistent topics, and is triggered by MetaStore notification. It seems
non-persistent topic metadata is not stored in
/managed-ledgers/tenant/namespace path, so it won't be notified.
```java
Pattern namespaceNameToTopicNamePattern(NamespaceName namespaceName) {
return Pattern.compile(
MANAGED_LEDGER_PATH + "/(" + namespaceName + ")/(" +
TopicDomain.persistent + ")/(" + "[^/]+)");
}
public void registerPersistentTopicListener(
NamespaceName namespaceName, BiConsumer<String, NotificationType>
listener) {
topicListeners.put(listener,
namespaceNameToTopicNamePattern(namespaceName));
}
```
--
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]