I think we don't need to do such changes. Instead, we should fix the
documentation of `ConsumerBuilder#topicsPattern`. From the
implementation here [1], the prefix before "://" in the topic pattern
should be ignored.

[1] 
https://github.com/apache/pulsar/blob/f1f8dab972b098be69ad35ab3d307f19284c4e48/pulsar-common/src/main/java/org/apache/pulsar/common/topics/TopicList.java#L56

Thanks,
Yunze

On Mon, Mar 20, 2023 at 9:32 AM Baodi Shi <ba...@apache.org> wrote:
>
> >
> > Should we state in the PIP which version it will be removed?
> >
>
> I think adding is best, but I'm not quite sure which version we should be
> specific to. How about v3.2.0? Wait for 2 major versions (3.0.0 and 3.1.0)
>
> Thanks,
> Baodi Shi
>
>
> 在 2023年3月17日 15:16:19 上,Zike Yang <z...@apache.org> 写道:
>
> > 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
> >
> > >
> >
> >

Reply via email to