Skip to content

[Bug] Topic list watcher doesn't filter system topics when they get created #25192

Closed

Description

@lhotari

Search before reporting

  • I searched in the issues and found nothing similar.

Read release policy

  • I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

User environment

All released versions

Issue Description

The topic list watcher is using org.apache.pulsar.broker.namespace.NamespaceService#getListOfPersistentTopics for listing topics and in addition, org.apache.pulsar.broker.resources.TopicResources#handleNotification doesn't filter out system topics. When a new system topic is added to the namespace, and the pattern is matching all topics, it would get passed to the client as a new topic to be subscribed to.
The expectation is that pattern (regex) topic consumer doesn't subscribe to system topics.
New system topics can be created by Pulsar's transaction support. The transaction support uses system topics that end with certain suffixes, for example with the __transaction_pending_ack suffix.

An additional detail is that topic list watcher initialization hasn't been able to benefit from deduplication added in #23049 since it wasn't using that method for listing topics. Since the listing was ignored, system topics didn't get subscribed when the pattern consumer was initialized. However, it was performing the listing on the broker side unnecessarily.

Error messages


Reproducing the issue

n/a

Additional information

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

  1. added
    type/bug
    on Jan 28, 2026
  2. changed the title [-][Bug] Topic list watcher doesn't filter system topics when they get added[/-] [+][Bug] Topic list watcher doesn't filter system topics when they get created[/+] on Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions