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.
   
![image](https://user-images.githubusercontent.com/63150695/136803033-99d023d9-a6ed-4bc6-a551-246746c56d3f.png)
   And no non-persistent topics are returned when calling 
"admin/v2/namespaces/{namespace}topics?mode=NON_PERSISTENT"
   
![image](https://user-images.githubusercontent.com/63150695/136804313-9eaf0818-e3ae-4e41-b2b8-849a03ba2d03.png)
   While non-persistent topics are returned when calling 
"admin/v2/non-persistent/{namespace}"
   
![image](https://user-images.githubusercontent.com/63150695/136804624-bf298a36-24ed-4f33-870c-dbf8be510fa0.png)
   
   
   **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]


Reply via email to