geniusjoe opened a new pull request, #1412:
URL: https://github.com/apache/pulsar-client-go/pull/1412

   Fixes https://github.com/apache/pulsar-client-go/pull/1314
   Master Issue: https://github.com/apache/pulsar/pull/21589
   
   ### Motivation
   When creating a consumer with `option.RetryEnable` option, consumer 
initialization needs to subscribe both `option.Topic` and 
`options.DLQ.RetryLetterTopic`, it will set `option.Topic` to empty string and 
move this topic to `option.Topics` for subscribing. 
   But `newDlqRouter()` function use `option.Topic` when generating default 
producer name, when we set `option.RetryEnable` to true, default producer name 
will become to `-<subscriptionName>-<consumerName>-<randomString>-DLQ` (missing 
topicName part).
   
   ### Modifications
   Modify `pulsar/consumer_impl.go#newDlqRouter()` initialization, when enable 
`option.RetryEnable` option, we try to find source topic in `option.Topics`. 
And if we set `option.RetryEnable` to false or there are multiple source 
topics, keep consistent with previous strategy(i.e. empty string).
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   This change is already covered by existing tests, such as 
   `pulsar/consumer_test.go#TestRLQ`
   `pulsar/consumer_test.go#TestRLQMultiTopics`
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (no)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (no)
   


-- 
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