aloyszhang opened a new issue #9742: URL: https://github.com/apache/pulsar/issues/9742
**Describe the bug** Consumer receive extra messages when enableRetry and retryLetterTopic and deadLetterTopic are not set. Currently, if enableRetry is set to true for a consumer and retryLetterTopic and deadLetterTopic are not set, ConsumerBuilderImpl will build the default retryLetterTopic and deadLetterTopic like : `tenant/namespaces/subscriptionName-RETRY` and `tenant/namespaces/subscriptionName-DLQ`. If we have two topics in the same namespace, assume `tenant/namespaces/topicA` and `tenant/namespaces/topicB`, and then 1. start subscription for `tenant/namespaces/topicA` with subscription name `sub-name`, 2. start subscription for `tenant/namespaces/topicB` with the same subscription name `sub-name` 3. enableRetry but not set specify retryLetterTopic and deadLetterTopic for the two subscriptions subscription for topicA and topicB will have the same retryLetterTopic `tenant/namespaces/sub-Name-RETRY` and the same deadLetterTopic `tenant/namespaces/sub-Name-DLQ`. So each subscription may receive message from another topic. **Expected behavior** Consuemr should not receive messages from non-subscribe topic ---------------------------------------------------------------- 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]
