Hi, Yong > How about using a blacklist way to restrict it?
It's a great idea. Maybe we can define the rules like `keyword` with regular expressions. Best, Mattison On Feb 2, 2023, 10:52 +0800, 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? > > 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. > > 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 > >