You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/12/03 04:14:04 UTC

[GitHub] [pulsar] aloyszhang commented on issue #8787: Add setter for the reader subscription name

aloyszhang commented on issue #8787:
URL: https://github.com/apache/pulsar/issues/8787#issuecomment-737653989


   Currently, we can set the readername by 
   ```java
    public ReaderBuilder<T> readerName(String readerName) {
           conf.setReaderName(readerName);
           return this;
       }
   ```
   But  `readerName` is used for setting  consuemrName (not subscription name) for the internal subscription 
   ```java
   if (readerConfiguration.getReaderName() != null) {
               consumerConfiguration.setConsumerName(readerConfiguration.getReaderName());
           }
   ```
   I think we can set the subscription name  by : 
   1. if we set the `readerName`, we can set the subcription name to `readerName`
   2. if not set the `readerName`, we use the origin logic which is  ”reader-“ or "multiTopicsReader-"  combine with a random part.


----------------------------------------------------------------
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:
users@infra.apache.org