LGTM. +1 It will make the API clearer without bringing breaking changes. > After the configuration is removed in subsequent versions, it will be clearer
Should we state in the PIP which version it will be removed? Thanks, Zike Yang On Fri, Mar 17, 2023 at 8:50 AM Baodi Shi <ba...@apache.org> wrote: > > Hi, Any ideas please discuss, thanks. > > Thanks, > Baodi Shi > > > 在 2023年3月13日 22:24:09 上,Baodi Shi <ba...@apache.org> 写道: > > > Hi all, > > > > I've started a PIP to discuss: PIP-258: Deprecation of the consumer > > subscribeTopicMode configuration > > > > ### Motivation > > > > About pattern subscribes of consumers, the `topicsPattern` and > > `subscribeTopicMode` configurations are contradictory. > > > > For example, the `topicsPattern` represents only subscription to > > `persistent topic`, but the `subscriptionTopicsMode` represents > > subscription to `all topic`. > > > > ``` java > > Pattern pattern = > > Pattern.compile("persistent://my-property/my-ns/pattern-topic.*"); > > Consumer<byte[]> consumer = pulsarClient.newConsumer() > > .topicsPattern(pattern) > > .subscriptionTopicsMode(RegexSubscriptionMode.AllTopics) > > .build(); > > ``` > > > > Finally, `all topics` are subscribed. It's very confusing. > > > > > > For more details, please read the PIP at > > https://github.com/apache/pulsar/issues/19798 > > <https://github.com/apache/pulsar/issues/19601> > > > > > > Thanks, > > Baodi Shi > >