jimmycxm opened a new issue #12328:
URL: https://github.com/apache/pulsar/issues/12328
**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:
1. 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
2. consumer subscribe to
Pattern.compile("non-persistent://goldwind/iothub/prop_data-(BZ|IT|MK)-FAST-.*")
3. 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.
--
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]