-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Describe the bug
Java client can subscribe persistent topics via regex, but failed to subscribe non-persistent topics.
After some efforts, I found client calls "/admin/v2/namespaces/{namespaces}/topics?mode=ALL" which can't return non-persistent topics.
To Reproduce
Steps to reproduce the behavior:
- Create topics like below:
bin/pulsar-admin topics create non-persistent://goldwind/iothub/prop_data-BZ-FAST-1min-001
bin/pulsar-admin topics create non-persistent://goldwind/iothub/prop_data-BZ-FAST-1min-002
bin/pulsar-admin topics create non-persistent://goldwind/iothub/prop_data-BZ-FAST_Metric-1min-001
bin/pulsar-admin topics create non-persistent://goldwind/iothub/prop_data-BZ-FAST_Metric-1min-002
bin/pulsar-admin topics create persistent://goldwind/iothub/prop_data-BZ-GRID-1min-001
bin/pulsar-admin topics create persistent://goldwind/iothub/prop_data-BZ-GRID-1min-002
bin/pulsar-admin topics create persistent://goldwind/iothub/prop_data-BZ-GRID_SECTION-1min-001
bin/pulsar-admin topics create persistent://goldwind/iothub/prop_data-BZ-GRID_SECTION-1min-002 - consumer subscribe to
Pattern.compile("non-persistent://goldwind/iothub/prop_data-(BZ|IT|MK)-FAST-.*") - No topic is subscribed.
Expected behavior
topic below should be matched:
non-persistent://goldwind/iothub/prop_data-BZ-FAST-1min-001
non-persistent://goldwind/iothub/prop_data-BZ-FAST-1min-002
non-persistent://goldwind/iothub/prop_data-BZ-FAST_Metric-1min-001
non-persistent://goldwind/iothub/prop_data-BZ-FAST_Metric-1min-002
Screenshots
Here're the topics.

And no non-persistent topics are returned when calling "admin/v2/namespaces/{namespace}topics?mode=NON_PERSISTENT"

While non-persistent topics are returned when calling "admin/v2/non-persistent/{namespace}"

Desktop (please complete the following information):
- OS: linux 64.
Additional context
Release 2.7.2 ,2.7.3, 2.8.0 got same issue.