aloyszhang opened a new pull request #11586:
URL: https://github.com/apache/pulsar/pull/11586
### Motivation
For a reader, pulsar will create a new subscription name first without
checking whether it's existed or not.
```java
String subscription = "multiTopicsReader-" +
DigestUtils.sha1Hex(UUID.randomUUID().toString()).substring(0, 10);
if
(StringUtils.isNotBlank(readerConfiguration.getSubscriptionRolePrefix())) {
subscription = readerConfiguration.getSubscriptionRolePrefix() +
"-" + subscription;
}
if (StringUtils.isNotBlank(readerConfiguration.getSubscriptionName())) {
subscription = readerConfiguration.getSubscriptionName();
}
```
This pull request aims to avoid create a new subscription name for reader if
it's already set before.
### Modifications
Check subscription from the `ReaderConfigurationData` first and if already
exist, we do not need to create a subscription name.
### Verifying this change
This change is a trivial rework without any test coverage.
### 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)
- The rest endpoints: ( no)
- The admin cli options: ( no)
- Anything that affects deployment: ( now)
### Documentation
no document need be added or updated since this change has nothing to do
with API and configuration
--
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]