giacomo-porro opened a new issue #9449:
URL: https://github.com/apache/pulsar/issues/9449


   **Describe the bug**
   Creating a consumer subscribed on different topics on different namespaces 
throws an error even if no regex pattern is used ( as per 
https://pulsar.incubator.apache.org/docs/en/concepts-messaging/#multi-topic-subscriptions
 )
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Create a custom tenant on pulsar with pulsar admin
   ```bin/pulsar-admin tenants create my-tenant```
   2. Create 2 different namespaces on that tenant with pulsar admin
   ```
   bin/pulsar-admin namespaces create my-tenant/ns1
   bin/pulsar-admin namespaces create my-tenant/ns2
   ```
   3. Create 2 topics, one per namespace with pulsar admin
   ```
   bin/pulsar-admin topics create my-tenant/ns1/topic-1
   bin/pulsar-admin topics create my-tenant/ns2/topic-2
   ```
   4. Run this code
   ```python
   import pulsar
   from _pulsar import ConsumerType
   
   def handle(consumer, message):
       print(message.value())
   
   client = pulsar.Client(service_url="pulsar://localhost:36650")
   consumer = client.subscribe(
               topic=["persistent://my-tenant/ns1/topic-1", 
"persistent://my-tenant/ns2/topic-2"],
               subscription_name="my-sub",
               consumer_type=ConsumerType.Shared,
               message_listener=handle,
               consumer_name="my-consumer-name"
           )
   ```
   
   I get the error ERROR [0x11a3f7dc0] MultiTopicsConsumerImpl:737 | Different 
namespace name. expected: qa/users now:qa/accounts
   
   I tried the same setup with the Java client and it works as expected
   
   **Expected behavior**
   The consumer should not throw an error and just connect correctly
   
   **Desktop (please complete the following information):**
    - OS: MacOSX Catalina
   
   **Additional context**
   I tried with pulsar python client 2.6.1, 2.6.2 and 2.7.0 and all of them had 
the 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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to