Hi Mattison:

Agree with Yong's idea. We can expose `disallowed topic` as a configuration
to the user side, and a more flexible way is to expose it as a
namespace-level policy. This can ensure that there is no need to do special
processing on customized keywords in the future, and the expected effect
can be achieved by modifying the configuration.

Think Yunze's concerns are justified for the system topic. Is it okay if we
use hard code? Because the identification of any keyword is likely to be
hit by the user. The hard code method is used to filter out system topics
and not allow users to operate during delete and create operations.

--
Thanks
Xiaolong Ran

Dave Fisher <wave4d...@comcast.net> 于2023年2月2日周四 11:26写道:

>
>
> Sent from my iPhone
>
> > On Feb 1, 2023, at 6:52 PM, Yong Zhang <zhangyong1025...@gmail.com>
> wrote:
> >
> > Mattison,
> >
> > I agree with you about restricting the topic name.
> >
> > How about using a blacklist way to restrict it?
>
> If we do then please call it by another name like “disallowed”.
>
> >
> > We can have a blacklist on the topic name restriction and make it
> > configurable. Add the keywords you mentioned in the default
> configuration.
> > That would have a more general way to block a topic name creation.
> > If we have more restrictions on the topic name in the future, this way
> > can make it easy to fit them without changing any code.
>
> Is there anyone asking for this feature?
>
> Best,
> Dave
> >
> > Thanks,
> > Yong
> >
> >> On Thu, 2 Feb 2023 at 07:33, <mattisonc...@gmail.com> wrote:
> >>
> >> Hi, All
> >>
> >> In the current implementation, pulsar didn't support topic name
> >> restriction. It's a good chance to discuss it.
> >>
> >> I think this discussion aims to identify what types of topic names we
> all
> >> need to restrict.
> >>
> >> I know three topic names that need to be restricted at the moment.
> >>
> >> 1. The `-partition-` keyword.
> >> 2. Topic name characters validation.
> >> 3. System topic prefix `__`.
> >>
> >>
> >> Please feel free to leave your comments.
> >> I will keep this discussion for a week. If there are no more new types
> of
> >> restrictions, I will refine the previous PIP-242[0] to explain more
> details.
> >>> If we have other restrictions behind this discussion. We can draft a
> new
> >> PIP to add it directly.
> >> Thanks to Michael's opinion[1], we can expand the PIP-242 scopes to help
> >> pulsar have a good topic name restriction.
> >>
> >> Best,
> >> Mattison
> >>
> >> [0] https://github.com/apache/pulsar/issues/19239
> >> [1] https://lists.apache.org/thread/dd1kxhodjvovtb8yyojkk209st4o0ft2
> >>
>
>

Reply via email to