You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by ma...@gmail.com on 2023/02/11 04:01:40 UTC

[DISCUSS] PIP-242 Topic name restrictions

Hi guys.

This is the refined PIP-242 discussion thread. Because we have discussed some parts of this in another thread[0][1], we can start the standard PIP discussion to reach a detailed consensus.

You can check here[2] to see the PIP.


Best,
Mattison

[0] https://lists.apache.org/thread/5s4kop7qmxgpvsnh65s42r9mv7qc1pxt
[1] https://lists.apache.org/thread/km7jp26zmnfj6t3hpq0rt77j7wvn45o6
[2] https://github.com/apache/pulsar/issues/19239

---------- Paste the document to help quotes ----------

### Motivation

Currently, the Apache Pulsar has no restrictions on the topic name. Even `system topics`, `partitioned topics` etc. which is confusing for our developers to identify whether this is a partition of a partitioned topic. Plus, we need to add more logic to be compatible with this special topic name. for example:

- https://github.com/apache/pulsar/pull/19240
- https://github.com/apache/pulsar/pull/19230
- https://github.com/apache/pulsar/pull/19171
- https://github.com/apache/pulsar/pull/19086
- ...

### Goal

This proposal aimed to add more restrictions for a topic name. that includes three parts as follows:
1. Using `NamedEntity` to validate the topic name characters.
2. Make the `-partition-` string the keyword. That allows the user to use it when it's a partitioned topic.
3. Introduce the new system topic structure. `__SYS__<name>__`


**Create a topic:**
_no corresponding partitioned topic_
- persistent://public/default/local-name (passed)
- persistent://public/default/local-name-partition-z (rejected by keyword)
- persistent://public/default/local-name-partition-0 (rejected by keyword)

_Has corresponding partitioned topic, **partitions=2** and topic partition name is **persistent://public/default/local-name**_

- persistent://public/default/local-name-partition-0 (passed, Because it is the partition topic's sub-partition)
- persistent://public/default/local-name-partition-z (rejected by keyword)
- persistent://public/default/local-name-partition-4 (rejected, Because it exceeds the number of maximum partitions)

**Create a partitioned topic(topic metadata)**

- persistent://public/default/local-name (passed)
- persistent://public/default/local-name-partition-z (rejected by keyword)
- persistent://public/default/local-name-partition-0 (rejected by keyword)

### Compatibility

We will introduce the new configuration `enableStrictTopicName`  to support compatibility. Users can easily disable it to get rid of the restrictions.

For the system topic names, I would like to keep the original names and introduce a new topic structure `__SYS__<name>__`

### API Changes

Add a new configuration, `enableStrictTopicName=false`.

### Implementation

1. Add configuration `enableStrictTopicName=false` and make it dynamic.
2. Add topic name validation by `NamedEntity`
3. Add partitioned topic rejection logic.
4. Add warning logs to inform users that we do not recommend creating topics that name with the restrictions name when users disable `enableStrictTopicName`.
5. Make `enableStrictTopicName=true` in the next major release. and mark that this config will be removed in the future.


Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by Yubiao Feng <yu...@streamnative.io.INVALID>.
Hi Mattison

Now we can create a topic with special characters in its name, but
Prometheus does not support it. Should we increase restrictions to avoid
this scenario?

See: https://github.com/apache/pulsar/pull/20230

Thanks
Yubiao Feng


On Sat, Feb 11, 2023 at 12:01 PM <ma...@gmail.com> wrote:

> Hi guys.
>
> This is the refined PIP-242 discussion thread. Because we have discussed
> some parts of this in another thread[0][1], we can start the standard PIP
> discussion to reach a detailed consensus.
>
> You can check here[2] to see the PIP.
>
>
> Best,
> Mattison
>
> [0] https://lists.apache.org/thread/5s4kop7qmxgpvsnh65s42r9mv7qc1pxt
> [1] https://lists.apache.org/thread/km7jp26zmnfj6t3hpq0rt77j7wvn45o6
> [2] https://github.com/apache/pulsar/issues/19239
>
> ---------- Paste the document to help quotes ----------
>
> ### Motivation
>
> Currently, the Apache Pulsar has no restrictions on the topic name. Even
> `system topics`, `partitioned topics` etc. which is confusing for our
> developers to identify whether this is a partition of a partitioned topic.
> Plus, we need to add more logic to be compatible with this special topic
> name. for example:
>
> - https://github.com/apache/pulsar/pull/19240
> - https://github.com/apache/pulsar/pull/19230
> - https://github.com/apache/pulsar/pull/19171
> - https://github.com/apache/pulsar/pull/19086
> - ...
>
> ### Goal
>
> This proposal aimed to add more restrictions for a topic name. that
> includes three parts as follows:
> 1. Using `NamedEntity` to validate the topic name characters.
> 2. Make the `-partition-` string the keyword. That allows the user to use
> it when it's a partitioned topic.
> 3. Introduce the new system topic structure. `__SYS__<name>__`
>
>
> **Create a topic:**
> _no corresponding partitioned topic_
> - persistent://public/default/local-name (passed)
> - persistent://public/default/local-name-partition-z (rejected by keyword)
> - persistent://public/default/local-name-partition-0 (rejected by keyword)
>
> _Has corresponding partitioned topic, **partitions=2** and topic partition
> name is **persistent://public/default/local-name**_
>
> - persistent://public/default/local-name-partition-0 (passed, Because it
> is the partition topic's sub-partition)
> - persistent://public/default/local-name-partition-z (rejected by keyword)
> - persistent://public/default/local-name-partition-4 (rejected, Because it
> exceeds the number of maximum partitions)
>
> **Create a partitioned topic(topic metadata)**
>
> - persistent://public/default/local-name (passed)
> - persistent://public/default/local-name-partition-z (rejected by keyword)
> - persistent://public/default/local-name-partition-0 (rejected by keyword)
>
> ### Compatibility
>
> We will introduce the new configuration `enableStrictTopicName`  to
> support compatibility. Users can easily disable it to get rid of the
> restrictions.
>
> For the system topic names, I would like to keep the original names and
> introduce a new topic structure `__SYS__<name>__`
>
> ### API Changes
>
> Add a new configuration, `enableStrictTopicName=false`.
>
> ### Implementation
>
> 1. Add configuration `enableStrictTopicName=false` and make it dynamic.
> 2. Add topic name validation by `NamedEntity`
> 3. Add partitioned topic rejection logic.
> 4. Add warning logs to inform users that we do not recommend creating
> topics that name with the restrictions name when users disable
> `enableStrictTopicName`.
> 5. Make `enableStrictTopicName=true` in the next major release. and mark
> that this config will be removed in the future.
>
>

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by ma...@gmail.com.
>These topics all end in uppercase letters, such as `-RETRY,` `-DLQ.`
Is it better to define the system topic name in uppercase(
'__SYSTEM__<name>' )?

I think we don't need to mark `-DLQ` and `-RETRY` to be the keyword. because they are the same as the normal topic for the broker side.

Best,
Mattison
On Feb 14, 2023, 17:38 +0800, Yubiao Feng <yu...@streamnative.io.invalid>, wrote:
> Hi Qiang
>
> ### System topic name
> '__system__<name>' I think this format is clearer.
> Now the system automatically creates topics of type retry consumer letters
> and dead letters.
> These topics all end in uppercase letters, such as `-RETRY,` `-DLQ.`
> Is it better to define the system topic name in uppercase(
> '__SYSTEM__<name>' )?
>
> ### Another comment
> If you now redesign the topic name restrictions, should we make `-RETRY`
> and `-DLQ` keywords?
>
> Thanks
> Yubiao Feng
>
> On Tue, Feb 14, 2023 at 5:06 PM Asaf Mesika <as...@gmail.com> wrote:
>
> > On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:
> >
> > > > Hi, Asaf
> > > >
> > > > Welcome to join this discussion.
> > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > topic?
> > > > Sorry, I didn't get your point. What do you mean by *system*?
> > > >
> >
> > This sentence was a reply to:
> >
> > 2. Make the `-partition-` string the keyword. That allows the user to use
> > > > it when it's a partitioned topic.
> > > >
> >
> > I wanted to say that this sentence should be:
> > Make the `-partition-` string the keyword, that allows the *system* to use
> > it when it's a partitioned topic.
> >
> >
> >
> > > > > > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> > > > Yes, That is a key point that I want to discuss in this
> > > > thread. `__system__<name>` is good for me.
> > > > > > Can you please elaborate what it means to make it dynamic exactly?
> > > > Sorry, I will refine it. it means we can update this configuration
> > > > dynamically. (using rest api or sth)
> > > >
> >
> > I'm unfamiliar with how Pulsar supports dynamic configuration. I would
> > love it if you can share a link or explain it briefly, thus explaining what
> > exactly you are going to change to support dynamic configuration.
> >
> > > > General question: In the last thread you said something about
> > > > configurablerules, etc? You decided not to use this idea?
> > > > IMO, That idea is an advanced feature. we may need more time to discuss
> > > > the details and for the topic name restriction, maybe we don't have
> > strong
> > > > reason to use that.
> > > >
> > > > We can introduce this advanced feature when we have a need for it.
> > > >
> > > > WDYT?
> > > >
> >
> > I agree. Future PIP and discussion.
> >
> >
> > > >
> > > > Best,
> > > > Mattison
> > > > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>,
> > wrote:
> > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > topic?
> > > >
> >

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by Enrico Olivelli <eo...@gmail.com>.
Il giorno gio 16 feb 2023 alle ore 14:39 Asaf Mesika
<as...@gmail.com> ha scritto:
>
> On Wed, Feb 15, 2023 at 4:36 PM <ma...@gmail.com> wrote:
>
> > Hi, All
> >
> > First of all, I want to list all of the system topics as follows. That
> > Yunze has mentioned before.
> >
> > Namespace level:
> >
> > • pulsar/system
> >     • transaction_coordinator_assign
> >     • __transaction_log_
> >     • resource-usage
> > • pulsar/<host>
> >     • healthcheck
> >
> > Topic level:
> >
> > • __change_events
> > • __transaction_buffer_snapshot_segment
> > • ...
> >
> > We can check the details here. [0]
> >
> > Secondly. I think we need focus on the system topic name prefix. we have
> > some options as follows:
> >
> > • __SYSTEM__
> > • __system__
> >
> >
> > Both them make sense for me. As there are already two people prefer
> > `__SYSTEM`. if no other people have concern, I will chose it.
> >
>
> I vote `__system__` since I think upper casing is not that common for
> internal names (for me it's "shouting" and requires an extra key press to
> write it).
> Examples:
>
> Cassandra System tables
> <https://docs.datastax.com/en/dse/5.1/cql/cql/cql_using/useQuerySystem.html>
> :
> * batches
>
> Postgres database catalog
> <https://www.postgresql.org/docs/current/catalogs.html>:
> * pg_database
> <https://www.postgresql.org/docs/current/catalog-pg-database.html>
>
> OpenSearch system indices
> <https://opensearch.org/docs/1.0/security-plugin/configuration/system-indices/>
> :
> * .opendistro-alerting-config
>
>
> So I think we should stick to `__system__`

__system__ may work for me,
but how do we deal with existing clusters ?


Enrico

>
>
> >
> > Best,
> > Mattison
> >
> > -[0]
> > https://github.com/apache/pulsar/blob/master/pulsar-common/src/main/java/org/apache/pulsar/common/naming/SystemTopicNames.java
> > On Feb 15, 2023, 11:36 +0800, Michael Marshall <mm...@apache.org>,
> > wrote:
> > > I support this PIP, thank you for driving it forward Mattison.
> > >
> > > I support using the prefix __SYSTEM__ for system topics, and I agree
> > > that DLQ and RETRY topics do not qualify as system topics because they
> > > are produced to and consumed by regular clients.
> > >
> > > I think we might benefit from a generic definition for a system topic.
> > > I provided a loose definition for system topics in this email [0]. I
> > > copy it here:
> > >
> > > A system topic is a topic that is completely internal to Pulsar
> > > components. Internally, it is a normal topic. It requires elevated
> > > permission to produce/consume when authorization is enabled, even if
> > > topic level policies are not enabled. Generic calls like
> > > `clearNamespaceBacklog` should not affect system topics. Deleting a
> > > namespace or tenant should delete the system topics within it.
> > >
> > > Thanks,
> > > Michael
> > >
> > > [0] https://lists.apache.org/thread/sr01hvqmdrnk4lxwfwzcpg7y21psj6tt
> > >
> > >
> > > On Tue, Feb 14, 2023 at 9:55 AM <ma...@gmail.com> wrote:
> > > >
> > > > > > Could you list all existing system topic names that are used so we
> > canunderstand the rule better?
> > > > Yes, sure. I will list it later.
> > > > > > And I saw that this proposal only forbids the creation of
> > thesetopics. What about writing messages to them? I think it's better notto
> > allow Pulsar clients to write messages to them. The Pulsar clientshould
> > configure something to get the permission to write messages tothem. To keep
> > the compatibility, maybe we can make use of the protocolversion.
> > > > Sure, I agree with your point, because the current proposal just want
> > to have topic name restriction. maybe we can revise the system topic
> > permission and etc in the next proposal. (relate to system topic)
> > > >
> > > > Best,
> > > > Mattison
> > > > On Feb 14, 2023, 21:22 +0800, Yunze Xu <yz...@streamnative.io.invalid>,
> > wrote:
> > > > > > Could you list all existing system topic names that are used so we
> > can
> > > > > > understand the rule better? Such as the "-RETRY" and "-DLQ" topics
> > > > > > mentioned above.
> > > > > >
> > > > > > And I saw that this proposal only forbids the creation of these
> > > > > > topics. What about writing messages to them? I think it's better
> > not
> > > > > > to allow Pulsar clients to write messages to them. The Pulsar
> > client
> > > > > > should configure something to get the permission to write messages
> > to
> > > > > > them. To keep the compatibility, maybe we can make use of the
> > protocol
> > > > > > version.
> > > > > >
> > > > > > Thanks
> > > > > > Yunze
> > > > > >
> > > > > > On Tue, Feb 14, 2023 at 5:38 PM Yubiao Feng
> > > > > > <yu...@streamnative.io.invalid> wrote:
> > > > > > > >
> > > > > > > > Hi Qiang
> > > > > > > >
> > > > > > > > ### System topic name
> > > > > > > > '__system__<name>' I think this format is clearer.
> > > > > > > > Now the system automatically creates topics of type retry
> > consumer letters
> > > > > > > > and dead letters.
> > > > > > > > These topics all end in uppercase letters, such as `-RETRY,`
> > `-DLQ.`
> > > > > > > > Is it better to define the system topic name in uppercase(
> > > > > > > > '__SYSTEM__<name>' )?
> > > > > > > >
> > > > > > > > ### Another comment
> > > > > > > > If you now redesign the topic name restrictions, should we
> > make `-RETRY`
> > > > > > > > and `-DLQ` keywords?
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > > Yubiao Feng
> > > > > > > >
> > > > > > > > On Tue, Feb 14, 2023 at 5:06 PM Asaf Mesika <
> > asaf.mesika@gmail.com> wrote:
> > > > > > > >
> > > > > > > > > > > > On Tue, Feb 14, 2023 at 3:46 AM <
> > mattisonchao@gmail.com> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > > > > Hi, Asaf
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Welcome to join this discussion.
> > > > > > > > > > > > > > > > > > > > You mean that allows the *system* to
> > use it when it's a partitioned
> > > > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > > > > Sorry, I didn't get your point. What do you
> > mean by *system*?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > This sentence was a reply to:
> > > > > > > > > > > >
> > > > > > > > > > > > 2. Make the `-partition-` string the keyword. That
> > allows the user to use
> > > > > > > > > > > > > > > > it when it's a partitioned topic.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > I wanted to say that this sentence should be:
> > > > > > > > > > > > Make the `-partition-` string the keyword, that allows
> > the *system* to use
> > > > > > > > > > > > it when it's a partitioned topic.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > Why postfix of `__`?Why uppercase
> > ?Maybe `__system__<name>`?
> > > > > > > > > > > > > > > > Yes, That is a key point that I want to
> > discuss in this
> > > > > > > > > > > > > > > > thread. `__system__<name>` is good for me.
> > > > > > > > > > > > > > > > > > > > Can you please elaborate what it means
> > to make it dynamic exactly?
> > > > > > > > > > > > > > > > Sorry, I will refine it. it means we can
> > update this configuration
> > > > > > > > > > > > > > > > dynamically. (using rest api or sth)
> > > > > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > I'm unfamiliar with how Pulsar supports dynamic
> > configuration. I would
> > > > > > > > > > > > love it if you can share a link or explain it briefly,
> > thus explaining what
> > > > > > > > > > > > exactly you are going to change to support dynamic
> > configuration.
> > > > > > > > > > > >
> > > > > > > > > > > > > > > > General question: In the last thread you said
> > something about
> > > > > > > > > > > > > > > > configurablerules, etc? You decided not to use
> > this idea?
> > > > > > > > > > > > > > > > IMO, That idea is an advanced feature. we may
> > need more time to discuss
> > > > > > > > > > > > > > > > the details and for the topic name
> > restriction, maybe we don't have
> > > > > > > > > > > > strong
> > > > > > > > > > > > > > > > reason to use that.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > We can introduce this advanced feature when we
> > have a need for it.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > WDYT?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > I agree. Future PIP and discussion.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Best,
> > > > > > > > > > > > > > > > Mattison
> > > > > > > > > > > > > > > > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <
> > asaf.mesika@gmail.com>,
> > > > > > > > > > > > wrote:
> > > > > > > > > > > > > > > > > > > > You mean that allows the *system* to
> > use it when it's a partitioned
> > > > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > >
> >

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by Asaf Mesika <as...@gmail.com>.
On Wed, Feb 15, 2023 at 4:36 PM <ma...@gmail.com> wrote:

> Hi, All
>
> First of all, I want to list all of the system topics as follows. That
> Yunze has mentioned before.
>
> Namespace level:
>
> • pulsar/system
>     • transaction_coordinator_assign
>     • __transaction_log_
>     • resource-usage
> • pulsar/<host>
>     • healthcheck
>
> Topic level:
>
> • __change_events
> • __transaction_buffer_snapshot_segment
> • ...
>
> We can check the details here. [0]
>
> Secondly. I think we need focus on the system topic name prefix. we have
> some options as follows:
>
> • __SYSTEM__
> • __system__
>
>
> Both them make sense for me. As there are already two people prefer
> `__SYSTEM`. if no other people have concern, I will chose it.
>

I vote `__system__` since I think upper casing is not that common for
internal names (for me it's "shouting" and requires an extra key press to
write it).
Examples:

Cassandra System tables
<https://docs.datastax.com/en/dse/5.1/cql/cql/cql_using/useQuerySystem.html>
:
* batches

Postgres database catalog
<https://www.postgresql.org/docs/current/catalogs.html>:
* pg_database
<https://www.postgresql.org/docs/current/catalog-pg-database.html>

OpenSearch system indices
<https://opensearch.org/docs/1.0/security-plugin/configuration/system-indices/>
:
* .opendistro-alerting-config


So I think we should stick to `__system__`


>
> Best,
> Mattison
>
> -[0]
> https://github.com/apache/pulsar/blob/master/pulsar-common/src/main/java/org/apache/pulsar/common/naming/SystemTopicNames.java
> On Feb 15, 2023, 11:36 +0800, Michael Marshall <mm...@apache.org>,
> wrote:
> > I support this PIP, thank you for driving it forward Mattison.
> >
> > I support using the prefix __SYSTEM__ for system topics, and I agree
> > that DLQ and RETRY topics do not qualify as system topics because they
> > are produced to and consumed by regular clients.
> >
> > I think we might benefit from a generic definition for a system topic.
> > I provided a loose definition for system topics in this email [0]. I
> > copy it here:
> >
> > A system topic is a topic that is completely internal to Pulsar
> > components. Internally, it is a normal topic. It requires elevated
> > permission to produce/consume when authorization is enabled, even if
> > topic level policies are not enabled. Generic calls like
> > `clearNamespaceBacklog` should not affect system topics. Deleting a
> > namespace or tenant should delete the system topics within it.
> >
> > Thanks,
> > Michael
> >
> > [0] https://lists.apache.org/thread/sr01hvqmdrnk4lxwfwzcpg7y21psj6tt
> >
> >
> > On Tue, Feb 14, 2023 at 9:55 AM <ma...@gmail.com> wrote:
> > >
> > > > > Could you list all existing system topic names that are used so we
> canunderstand the rule better?
> > > Yes, sure. I will list it later.
> > > > > And I saw that this proposal only forbids the creation of
> thesetopics. What about writing messages to them? I think it's better notto
> allow Pulsar clients to write messages to them. The Pulsar clientshould
> configure something to get the permission to write messages tothem. To keep
> the compatibility, maybe we can make use of the protocolversion.
> > > Sure, I agree with your point, because the current proposal just want
> to have topic name restriction. maybe we can revise the system topic
> permission and etc in the next proposal. (relate to system topic)
> > >
> > > Best,
> > > Mattison
> > > On Feb 14, 2023, 21:22 +0800, Yunze Xu <yz...@streamnative.io.invalid>,
> wrote:
> > > > > Could you list all existing system topic names that are used so we
> can
> > > > > understand the rule better? Such as the "-RETRY" and "-DLQ" topics
> > > > > mentioned above.
> > > > >
> > > > > And I saw that this proposal only forbids the creation of these
> > > > > topics. What about writing messages to them? I think it's better
> not
> > > > > to allow Pulsar clients to write messages to them. The Pulsar
> client
> > > > > should configure something to get the permission to write messages
> to
> > > > > them. To keep the compatibility, maybe we can make use of the
> protocol
> > > > > version.
> > > > >
> > > > > Thanks
> > > > > Yunze
> > > > >
> > > > > On Tue, Feb 14, 2023 at 5:38 PM Yubiao Feng
> > > > > <yu...@streamnative.io.invalid> wrote:
> > > > > > >
> > > > > > > Hi Qiang
> > > > > > >
> > > > > > > ### System topic name
> > > > > > > '__system__<name>' I think this format is clearer.
> > > > > > > Now the system automatically creates topics of type retry
> consumer letters
> > > > > > > and dead letters.
> > > > > > > These topics all end in uppercase letters, such as `-RETRY,`
> `-DLQ.`
> > > > > > > Is it better to define the system topic name in uppercase(
> > > > > > > '__SYSTEM__<name>' )?
> > > > > > >
> > > > > > > ### Another comment
> > > > > > > If you now redesign the topic name restrictions, should we
> make `-RETRY`
> > > > > > > and `-DLQ` keywords?
> > > > > > >
> > > > > > > Thanks
> > > > > > > Yubiao Feng
> > > > > > >
> > > > > > > On Tue, Feb 14, 2023 at 5:06 PM Asaf Mesika <
> asaf.mesika@gmail.com> wrote:
> > > > > > >
> > > > > > > > > > > On Tue, Feb 14, 2023 at 3:46 AM <
> mattisonchao@gmail.com> wrote:
> > > > > > > > > > >
> > > > > > > > > > > > > > > Hi, Asaf
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Welcome to join this discussion.
> > > > > > > > > > > > > > > > > > > You mean that allows the *system* to
> use it when it's a partitioned
> > > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > > > Sorry, I didn't get your point. What do you
> mean by *system*?
> > > > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > This sentence was a reply to:
> > > > > > > > > > >
> > > > > > > > > > > 2. Make the `-partition-` string the keyword. That
> allows the user to use
> > > > > > > > > > > > > > > it when it's a partitioned topic.
> > > > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > I wanted to say that this sentence should be:
> > > > > > > > > > > Make the `-partition-` string the keyword, that allows
> the *system* to use
> > > > > > > > > > > it when it's a partitioned topic.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > Why postfix of `__`?Why uppercase
> ?Maybe `__system__<name>`?
> > > > > > > > > > > > > > > Yes, That is a key point that I want to
> discuss in this
> > > > > > > > > > > > > > > thread. `__system__<name>` is good for me.
> > > > > > > > > > > > > > > > > > > Can you please elaborate what it means
> to make it dynamic exactly?
> > > > > > > > > > > > > > > Sorry, I will refine it. it means we can
> update this configuration
> > > > > > > > > > > > > > > dynamically. (using rest api or sth)
> > > > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > I'm unfamiliar with how Pulsar supports dynamic
> configuration. I would
> > > > > > > > > > > love it if you can share a link or explain it briefly,
> thus explaining what
> > > > > > > > > > > exactly you are going to change to support dynamic
> configuration.
> > > > > > > > > > >
> > > > > > > > > > > > > > > General question: In the last thread you said
> something about
> > > > > > > > > > > > > > > configurablerules, etc? You decided not to use
> this idea?
> > > > > > > > > > > > > > > IMO, That idea is an advanced feature. we may
> need more time to discuss
> > > > > > > > > > > > > > > the details and for the topic name
> restriction, maybe we don't have
> > > > > > > > > > > strong
> > > > > > > > > > > > > > > reason to use that.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > We can introduce this advanced feature when we
> have a need for it.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > WDYT?
> > > > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > I agree. Future PIP and discussion.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Best,
> > > > > > > > > > > > > > > Mattison
> > > > > > > > > > > > > > > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <
> asaf.mesika@gmail.com>,
> > > > > > > > > > > wrote:
> > > > > > > > > > > > > > > > > > > You mean that allows the *system* to
> use it when it's a partitioned
> > > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > > >
> > > > > > > > > > >
>

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by ma...@gmail.com.
Hi, All

First of all, I want to list all of the system topics as follows. That Yunze has mentioned before.

Namespace level:

• pulsar/system
    • transaction_coordinator_assign
    • __transaction_log_
    • resource-usage
• pulsar/<host>
    • healthcheck

Topic level:

• __change_events
• __transaction_buffer_snapshot_segment
• ...

We can check the details here. [0]

Secondly. I think we need focus on the system topic name prefix. we have some options as follows:

• __SYSTEM__
• __system__


Both them make sense for me. As there are already two people prefer `__SYSTEM`. if no other people have concern, I will chose it.

Best,
Mattison

-[0] https://github.com/apache/pulsar/blob/master/pulsar-common/src/main/java/org/apache/pulsar/common/naming/SystemTopicNames.java
On Feb 15, 2023, 11:36 +0800, Michael Marshall <mm...@apache.org>, wrote:
> I support this PIP, thank you for driving it forward Mattison.
>
> I support using the prefix __SYSTEM__ for system topics, and I agree
> that DLQ and RETRY topics do not qualify as system topics because they
> are produced to and consumed by regular clients.
>
> I think we might benefit from a generic definition for a system topic.
> I provided a loose definition for system topics in this email [0]. I
> copy it here:
>
> A system topic is a topic that is completely internal to Pulsar
> components. Internally, it is a normal topic. It requires elevated
> permission to produce/consume when authorization is enabled, even if
> topic level policies are not enabled. Generic calls like
> `clearNamespaceBacklog` should not affect system topics. Deleting a
> namespace or tenant should delete the system topics within it.
>
> Thanks,
> Michael
>
> [0] https://lists.apache.org/thread/sr01hvqmdrnk4lxwfwzcpg7y21psj6tt
>
>
> On Tue, Feb 14, 2023 at 9:55 AM <ma...@gmail.com> wrote:
> >
> > > > Could you list all existing system topic names that are used so we canunderstand the rule better?
> > Yes, sure. I will list it later.
> > > > And I saw that this proposal only forbids the creation of thesetopics. What about writing messages to them? I think it's better notto allow Pulsar clients to write messages to them. The Pulsar clientshould configure something to get the permission to write messages tothem. To keep the compatibility, maybe we can make use of the protocolversion.
> > Sure, I agree with your point, because the current proposal just want to have topic name restriction. maybe we can revise the system topic permission and etc in the next proposal. (relate to system topic)
> >
> > Best,
> > Mattison
> > On Feb 14, 2023, 21:22 +0800, Yunze Xu <yz...@streamnative.io.invalid>, wrote:
> > > > Could you list all existing system topic names that are used so we can
> > > > understand the rule better? Such as the "-RETRY" and "-DLQ" topics
> > > > mentioned above.
> > > >
> > > > And I saw that this proposal only forbids the creation of these
> > > > topics. What about writing messages to them? I think it's better not
> > > > to allow Pulsar clients to write messages to them. The Pulsar client
> > > > should configure something to get the permission to write messages to
> > > > them. To keep the compatibility, maybe we can make use of the protocol
> > > > version.
> > > >
> > > > Thanks
> > > > Yunze
> > > >
> > > > On Tue, Feb 14, 2023 at 5:38 PM Yubiao Feng
> > > > <yu...@streamnative.io.invalid> wrote:
> > > > > >
> > > > > > Hi Qiang
> > > > > >
> > > > > > ### System topic name
> > > > > > '__system__<name>' I think this format is clearer.
> > > > > > Now the system automatically creates topics of type retry consumer letters
> > > > > > and dead letters.
> > > > > > These topics all end in uppercase letters, such as `-RETRY,` `-DLQ.`
> > > > > > Is it better to define the system topic name in uppercase(
> > > > > > '__SYSTEM__<name>' )?
> > > > > >
> > > > > > ### Another comment
> > > > > > If you now redesign the topic name restrictions, should we make `-RETRY`
> > > > > > and `-DLQ` keywords?
> > > > > >
> > > > > > Thanks
> > > > > > Yubiao Feng
> > > > > >
> > > > > > On Tue, Feb 14, 2023 at 5:06 PM Asaf Mesika <as...@gmail.com> wrote:
> > > > > >
> > > > > > > > > > On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:
> > > > > > > > > >
> > > > > > > > > > > > > > Hi, Asaf
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Welcome to join this discussion.
> > > > > > > > > > > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > > Sorry, I didn't get your point. What do you mean by *system*?
> > > > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > This sentence was a reply to:
> > > > > > > > > >
> > > > > > > > > > 2. Make the `-partition-` string the keyword. That allows the user to use
> > > > > > > > > > > > > > it when it's a partitioned topic.
> > > > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > I wanted to say that this sentence should be:
> > > > > > > > > > Make the `-partition-` string the keyword, that allows the *system* to use
> > > > > > > > > > it when it's a partitioned topic.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > > > > > > > > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> > > > > > > > > > > > > > Yes, That is a key point that I want to discuss in this
> > > > > > > > > > > > > > thread. `__system__<name>` is good for me.
> > > > > > > > > > > > > > > > > > Can you please elaborate what it means to make it dynamic exactly?
> > > > > > > > > > > > > > Sorry, I will refine it. it means we can update this configuration
> > > > > > > > > > > > > > dynamically. (using rest api or sth)
> > > > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > I'm unfamiliar with how Pulsar supports dynamic configuration. I would
> > > > > > > > > > love it if you can share a link or explain it briefly, thus explaining what
> > > > > > > > > > exactly you are going to change to support dynamic configuration.
> > > > > > > > > >
> > > > > > > > > > > > > > General question: In the last thread you said something about
> > > > > > > > > > > > > > configurablerules, etc? You decided not to use this idea?
> > > > > > > > > > > > > > IMO, That idea is an advanced feature. we may need more time to discuss
> > > > > > > > > > > > > > the details and for the topic name restriction, maybe we don't have
> > > > > > > > > > strong
> > > > > > > > > > > > > > reason to use that.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > We can introduce this advanced feature when we have a need for it.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > WDYT?
> > > > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > I agree. Future PIP and discussion.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Best,
> > > > > > > > > > > > > > Mattison
> > > > > > > > > > > > > > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>,
> > > > > > > > > > wrote:
> > > > > > > > > > > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > >
> > > > > > > > > >

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by Michael Marshall <mm...@apache.org>.
I support this PIP, thank you for driving it forward Mattison.

I support using the prefix __SYSTEM__ for system topics, and I agree
that DLQ and RETRY topics do not qualify as system topics because they
are produced to and consumed by regular clients.

I think we might benefit from a generic definition for a system topic.
I provided a loose definition for system topics in this email [0]. I
copy it here:

A system topic is a topic that is completely internal to Pulsar
components. Internally, it is a normal topic. It requires elevated
permission to produce/consume when authorization is enabled, even if
topic level policies are not enabled. Generic calls like
`clearNamespaceBacklog` should not affect system topics. Deleting a
namespace or tenant should delete the system topics within it.

Thanks,
Michael

[0] https://lists.apache.org/thread/sr01hvqmdrnk4lxwfwzcpg7y21psj6tt


On Tue, Feb 14, 2023 at 9:55 AM <ma...@gmail.com> wrote:
>
> > Could you list all existing system topic names that are used so we canunderstand the rule better?
> Yes, sure. I will list it later.
> > And I saw that this proposal only forbids the creation of thesetopics. What about writing messages to them? I think it's better notto allow Pulsar clients to write messages to them. The Pulsar clientshould configure something to get the permission to write messages tothem. To keep the compatibility, maybe we can make use of the protocolversion.
> Sure,  I agree with your point, because the current proposal just want to have topic name restriction. maybe we can revise the system topic permission and etc in the next proposal. (relate to system topic)
>
> Best,
> Mattison
> On Feb 14, 2023, 21:22 +0800, Yunze Xu <yz...@streamnative.io.invalid>, wrote:
> > Could you list all existing system topic names that are used so we can
> > understand the rule better? Such as the "-RETRY" and "-DLQ" topics
> > mentioned above.
> >
> > And I saw that this proposal only forbids the creation of these
> > topics. What about writing messages to them? I think it's better not
> > to allow Pulsar clients to write messages to them. The Pulsar client
> > should configure something to get the permission to write messages to
> > them. To keep the compatibility, maybe we can make use of the protocol
> > version.
> >
> > Thanks
> > Yunze
> >
> > On Tue, Feb 14, 2023 at 5:38 PM Yubiao Feng
> > <yu...@streamnative.io.invalid> wrote:
> > >
> > > Hi Qiang
> > >
> > > ### System topic name
> > > '__system__<name>' I think this format is clearer.
> > > Now the system automatically creates topics of type retry consumer letters
> > > and dead letters.
> > > These topics all end in uppercase letters, such as `-RETRY,` `-DLQ.`
> > > Is it better to define the system topic name in uppercase(
> > > '__SYSTEM__<name>' )?
> > >
> > > ### Another comment
> > > If you now redesign the topic name restrictions, should we make `-RETRY`
> > > and `-DLQ` keywords?
> > >
> > > Thanks
> > > Yubiao Feng
> > >
> > > On Tue, Feb 14, 2023 at 5:06 PM Asaf Mesika <as...@gmail.com> wrote:
> > >
> > > > > On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:
> > > > >
> > > > > > > Hi, Asaf
> > > > > > >
> > > > > > > Welcome to join this discussion.
> > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > > topic?
> > > > > > > Sorry, I didn't get your point. What do you mean by *system*?
> > > > > > >
> > > > >
> > > > > This sentence was a reply to:
> > > > >
> > > > > 2. Make the `-partition-` string the keyword. That allows the user to use
> > > > > > > it when it's a partitioned topic.
> > > > > > >
> > > > >
> > > > > I wanted to say that this sentence should be:
> > > > > Make the `-partition-` string the keyword, that allows the *system* to use
> > > > > it when it's a partitioned topic.
> > > > >
> > > > >
> > > > >
> > > > > > > > > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> > > > > > > Yes, That is a key point that I want to discuss in this
> > > > > > > thread. `__system__<name>` is good for me.
> > > > > > > > > Can you please elaborate what it means to make it dynamic exactly?
> > > > > > > Sorry, I will refine it. it means we can update this configuration
> > > > > > > dynamically. (using rest api or sth)
> > > > > > >
> > > > >
> > > > > I'm unfamiliar with how Pulsar supports dynamic configuration. I would
> > > > > love it if you can share a link or explain it briefly, thus explaining what
> > > > > exactly you are going to change to support dynamic configuration.
> > > > >
> > > > > > > General question: In the last thread you said something about
> > > > > > > configurablerules, etc? You decided not to use this idea?
> > > > > > > IMO, That idea is an advanced feature. we may need more time to discuss
> > > > > > > the details and for the topic name restriction, maybe we don't have
> > > > > strong
> > > > > > > reason to use that.
> > > > > > >
> > > > > > > We can introduce this advanced feature when we have a need for it.
> > > > > > >
> > > > > > > WDYT?
> > > > > > >
> > > > >
> > > > > I agree. Future PIP and discussion.
> > > > >
> > > > >
> > > > > > >
> > > > > > > Best,
> > > > > > > Mattison
> > > > > > > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>,
> > > > > wrote:
> > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > > topic?
> > > > > > >
> > > > >

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by ma...@gmail.com.
> Could you list all existing system topic names that are used so we canunderstand the rule better?
Yes, sure. I will list it later.
> And I saw that this proposal only forbids the creation of thesetopics. What about writing messages to them? I think it's better notto allow Pulsar clients to write messages to them. The Pulsar clientshould configure something to get the permission to write messages tothem. To keep the compatibility, maybe we can make use of the protocolversion.
Sure,  I agree with your point, because the current proposal just want to have topic name restriction. maybe we can revise the system topic permission and etc in the next proposal. (relate to system topic)

Best,
Mattison
On Feb 14, 2023, 21:22 +0800, Yunze Xu <yz...@streamnative.io.invalid>, wrote:
> Could you list all existing system topic names that are used so we can
> understand the rule better? Such as the "-RETRY" and "-DLQ" topics
> mentioned above.
>
> And I saw that this proposal only forbids the creation of these
> topics. What about writing messages to them? I think it's better not
> to allow Pulsar clients to write messages to them. The Pulsar client
> should configure something to get the permission to write messages to
> them. To keep the compatibility, maybe we can make use of the protocol
> version.
>
> Thanks
> Yunze
>
> On Tue, Feb 14, 2023 at 5:38 PM Yubiao Feng
> <yu...@streamnative.io.invalid> wrote:
> >
> > Hi Qiang
> >
> > ### System topic name
> > '__system__<name>' I think this format is clearer.
> > Now the system automatically creates topics of type retry consumer letters
> > and dead letters.
> > These topics all end in uppercase letters, such as `-RETRY,` `-DLQ.`
> > Is it better to define the system topic name in uppercase(
> > '__SYSTEM__<name>' )?
> >
> > ### Another comment
> > If you now redesign the topic name restrictions, should we make `-RETRY`
> > and `-DLQ` keywords?
> >
> > Thanks
> > Yubiao Feng
> >
> > On Tue, Feb 14, 2023 at 5:06 PM Asaf Mesika <as...@gmail.com> wrote:
> >
> > > > On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:
> > > >
> > > > > > Hi, Asaf
> > > > > >
> > > > > > Welcome to join this discussion.
> > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > topic?
> > > > > > Sorry, I didn't get your point. What do you mean by *system*?
> > > > > >
> > > >
> > > > This sentence was a reply to:
> > > >
> > > > 2. Make the `-partition-` string the keyword. That allows the user to use
> > > > > > it when it's a partitioned topic.
> > > > > >
> > > >
> > > > I wanted to say that this sentence should be:
> > > > Make the `-partition-` string the keyword, that allows the *system* to use
> > > > it when it's a partitioned topic.
> > > >
> > > >
> > > >
> > > > > > > > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> > > > > > Yes, That is a key point that I want to discuss in this
> > > > > > thread. `__system__<name>` is good for me.
> > > > > > > > Can you please elaborate what it means to make it dynamic exactly?
> > > > > > Sorry, I will refine it. it means we can update this configuration
> > > > > > dynamically. (using rest api or sth)
> > > > > >
> > > >
> > > > I'm unfamiliar with how Pulsar supports dynamic configuration. I would
> > > > love it if you can share a link or explain it briefly, thus explaining what
> > > > exactly you are going to change to support dynamic configuration.
> > > >
> > > > > > General question: In the last thread you said something about
> > > > > > configurablerules, etc? You decided not to use this idea?
> > > > > > IMO, That idea is an advanced feature. we may need more time to discuss
> > > > > > the details and for the topic name restriction, maybe we don't have
> > > > strong
> > > > > > reason to use that.
> > > > > >
> > > > > > We can introduce this advanced feature when we have a need for it.
> > > > > >
> > > > > > WDYT?
> > > > > >
> > > >
> > > > I agree. Future PIP and discussion.
> > > >
> > > >
> > > > > >
> > > > > > Best,
> > > > > > Mattison
> > > > > > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>,
> > > > wrote:
> > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > topic?
> > > > > >
> > > >

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by Yunze Xu <yz...@streamnative.io.INVALID>.
Could you list all existing system topic names that are used so we can
understand the rule better? Such as the "-RETRY" and "-DLQ" topics
mentioned above.

And I saw that this proposal only forbids the creation of these
topics. What about writing messages to them? I think it's better not
to allow Pulsar clients to write messages to them. The Pulsar client
should configure something to get the permission to write messages to
them. To keep the compatibility, maybe we can make use of the protocol
version.

Thanks
Yunze

On Tue, Feb 14, 2023 at 5:38 PM Yubiao Feng
<yu...@streamnative.io.invalid> wrote:
>
> Hi Qiang
>
> ### System topic name
> '__system__<name>' I think this format is clearer.
> Now the system automatically creates topics of type retry consumer letters
> and dead letters.
> These topics all end in uppercase letters, such as `-RETRY,` `-DLQ.`
> Is it better to define the system topic name in uppercase(
> '__SYSTEM__<name>'  )?
>
> ### Another comment
> If you now redesign the topic name restrictions, should we make `-RETRY`
> and `-DLQ` keywords?
>
> Thanks
> Yubiao Feng
>
> On Tue, Feb 14, 2023 at 5:06 PM Asaf Mesika <as...@gmail.com> wrote:
>
> > On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:
> >
> > > Hi, Asaf
> > >
> > > Welcome to join this discussion.
> > > > You mean that allows the *system* to use it when it's a partitioned
> > > topic?
> > > Sorry, I didn't get your point. What do you mean by *system*?
> > >
> >
> > This sentence was a reply to:
> >
> > 2. Make the `-partition-` string the keyword. That allows the user to use
> > > it when it's a partitioned topic.
> > >
> >
> >  I wanted to say that this sentence should be:
> > Make the `-partition-` string the keyword, that allows the *system* to use
> > it when it's a partitioned topic.
> >
> >
> >
> > > > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> > > Yes, That is a key point that I want to discuss in this
> > > thread.  `__system__<name>` is good for me.
> > > > Can you please elaborate what it means to make it dynamic exactly?
> > > Sorry, I will refine it. it means we can update this configuration
> > > dynamically. (using rest api or sth)
> > >
> >
> > I'm  unfamiliar with how Pulsar supports dynamic configuration. I would
> > love it if you can share a link or explain it briefly, thus explaining what
> > exactly you are going to change to support dynamic configuration.
> >
> > > General question: In the last thread you said something about
> > > configurablerules, etc? You decided not to use this idea?
> > > IMO, That idea is an advanced feature. we may need more time to discuss
> > > the details and for the topic name restriction, maybe we don't have
> > strong
> > > reason to use that.
> > >
> > > We can introduce this advanced feature when we have a need for it.
> > >
> > > WDYT?
> > >
> >
> > I agree. Future PIP and discussion.
> >
> >
> > >
> > > Best,
> > > Mattison
> > > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>,
> > wrote:
> > > > You mean that allows the *system* to use it when it's a partitioned
> > > topic?
> > >
> >

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by Yubiao Feng <yu...@streamnative.io.INVALID>.
Hi Qiang

### System topic name
'__system__<name>' I think this format is clearer.
Now the system automatically creates topics of type retry consumer letters
and dead letters.
These topics all end in uppercase letters, such as `-RETRY,` `-DLQ.`
Is it better to define the system topic name in uppercase(
'__SYSTEM__<name>'  )?

### Another comment
If you now redesign the topic name restrictions, should we make `-RETRY`
and `-DLQ` keywords?

Thanks
Yubiao Feng

On Tue, Feb 14, 2023 at 5:06 PM Asaf Mesika <as...@gmail.com> wrote:

> On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:
>
> > Hi, Asaf
> >
> > Welcome to join this discussion.
> > > You mean that allows the *system* to use it when it's a partitioned
> > topic?
> > Sorry, I didn't get your point. What do you mean by *system*?
> >
>
> This sentence was a reply to:
>
> 2. Make the `-partition-` string the keyword. That allows the user to use
> > it when it's a partitioned topic.
> >
>
>  I wanted to say that this sentence should be:
> Make the `-partition-` string the keyword, that allows the *system* to use
> it when it's a partitioned topic.
>
>
>
> > > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> > Yes, That is a key point that I want to discuss in this
> > thread.  `__system__<name>` is good for me.
> > > Can you please elaborate what it means to make it dynamic exactly?
> > Sorry, I will refine it. it means we can update this configuration
> > dynamically. (using rest api or sth)
> >
>
> I'm  unfamiliar with how Pulsar supports dynamic configuration. I would
> love it if you can share a link or explain it briefly, thus explaining what
> exactly you are going to change to support dynamic configuration.
>
> > General question: In the last thread you said something about
> > configurablerules, etc? You decided not to use this idea?
> > IMO, That idea is an advanced feature. we may need more time to discuss
> > the details and for the topic name restriction, maybe we don't have
> strong
> > reason to use that.
> >
> > We can introduce this advanced feature when we have a need for it.
> >
> > WDYT?
> >
>
> I agree. Future PIP and discussion.
>
>
> >
> > Best,
> > Mattison
> > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>,
> wrote:
> > > You mean that allows the *system* to use it when it's a partitioned
> > topic?
> >
>

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by Asaf Mesika <as...@gmail.com>.
Is  https://github.com/apache/pulsar/pull/19235 somehow related?

On Sat, Feb 18, 2023 at 10:38 AM <ma...@gmail.com> wrote:

> Hi, All
>
> After discussing with Enrico and Michael offline.
> I will split the discussed topic into two PIP.
>
> 1. Topic name restrictions
>     a. `-partition-` keyword.
>     b. enable topic name character pattern.
> 2. System topic
>     a. System topic name pattern.
>     b. System topic authorisation.
>     c. ...
>
> In this approach, we will get a clear boundary and avoid going off the
> initial scope.
>
> Since we don't have any question about the first scope. I will start vote
> next week.
>
> Thanks to all participant.
>
> Best,
> Mattison
>
>
>
> On Feb 18, 2023, 14:24 +0800, Michael Marshall <mm...@apache.org>,
> wrote:
> > I support breaking this into two PIPs. It was my fault the two PIPs
> > were merged in the first place. I am sorry if I created any confusion.
> > My intention was only to point out that names are a meaningful way to
> > simplify logic, and we should reserve certain names for Pulsar's own
> > usage with a well defined pattern so that we can simplify lifecycle
> > operations.
> >
> > Thanks,
> > Michael
> >
> > On Fri, Feb 17, 2023 at 1:55 AM Enrico Olivelli <eo...@gmail.com>
> wrote:
> > >
> > > Mattison,
> > >
> > > Il giorno gio 16 feb 2023 alle ore 00:27 <ma...@gmail.com> ha
> scritto:
> > > > >
> > > > > > > I am sorry but I am not sure that this is enough to
> preventreads/writes from unallowed clients.
> > > > > IMO, We can consider the authorisation part in another PIP because
> We are just focusing on adding the topic name constraint of topic creation.
> > > > >
> > > > > Maybe we can use another PIP to clearify all of system topic's
> behaviour, like authorisation something.
> > > > > e.g. we just allow superusers to read/write the data to that
> system topic.
> > > > > > > We should elaborate more on this topic on the PIP
> > > > > I will add the internal system topic creation logic in the PIP.
> > > Why do you think that this is enough ?
> > >
> > > I think that we are going off the initial scope of the PIP.
> > > The initial problem is about preventing clients from creating topics
> > > that contain the "-partition-" keyword.
> > >
> > > I totally agree that there must be a clear way to distinguish topics
> > > that are not meant to be accessed by "regular clients".
> > >
> > > The answer is in Micheal's words: only super users are allowed to
> > > access topics that are not meant to be accessed by clients.
> > > Broker to Broker communications are always running with a "super user"
> > > role, so it is not a problem.
> > >
> > > BTW I wonder if it is better to narrow down the scope of the PIP and
> > > go back to "-partition-"
> > >
> > >
> > > Enrico
> > >
> > >
> > > > >
> > > > > Best,
> > > > > Mattison
> > > > > On Feb 16, 2023, 00:41 +0800, Enrico Olivelli <eo...@gmail.com>,
> wrote:
> > > > > > > Il giorno mer 15 feb 2023 alle ore 17:07 <
> mattisonchao@gmail.com> ha scritto:
> > > > > > > > >
> > > > > > > > > Hi Enrico
> > > > > > > > >
> > > > > > > > > I think it's a good question. We can introduce a new
> method in the BrokerService to help brokers create the topic internally
> first(maybe just metadata is enough), and then to use a pulsar client to
> connect to it.
> > > > > > >
> > > > > > > I am sorry but I am not sure that this is enough to prevent
> > > > > > > reads/writes from unallowed clients.
> > > > > > > We should elaborate more on this topic on the PIP
> > > > > > >
> > > > > > > Enrico
> > > > > > >
> > > > > > > > >
> > > > > > > > > WDYT?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Best,
> > > > > > > > > Mattison
> > > > > > > > > On Feb 16, 2023, 00:01 +0800, Enrico Olivelli <
> eolivelli@gmail.com>, wrote:
> > > > > > > > > > > > > I have one question (apologies for the top
> posting).
> > > > > > > > > > > > >
> > > > > > > > > > > > > The Broker (and the other Pulsar components) use
> the regular Pulsar
> > > > > > > > > > > > > client to connect to "system topics"
> > > > > > > > > > > > > and in general they use the Pulsar wire protocol.
> > > > > > > > > > > > >
> > > > > > > > > > > > > The question is "how do you distinguish an
> internal component from a
> > > > > > > > > > > > > user component ?"
> > > > > > > > > > > > > How can you say that the broker is able to connect
> to a system topic
> > > > > > > > > > > > > and any other client cannot do it ?
> > > > > > > > > > > > >
> > > > > > > > > > > > > Enrico
> > > > > > > > > > > > >
> > > > > > > > > > > > > Il giorno mer 15 feb 2023 alle ore 15:38 <
> mattisonchao@gmail.com> ha scritto:
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Hi Asaf
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > There is a link to introduce the dynamic
> configuration.
> > > > > > > > > > > > > > > > >
> https://pulsar.apache.org/docs/2.10.x/admin-api-brokers/#dynamic-broker-configuration
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Best,
> > > > > > > > > > > > > > > > > Mattison
> > > > > > > > > > > > > > > > > On Feb 14, 2023, 17:06 +0800, Asaf Mesika <
> asaf.mesika@gmail.com>, wrote:
> > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Feb 14, 2023 at
> 3:46 AM <ma...@gmail.com> wrote:
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, Asaf
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Welcome to
> join this discussion.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > You mean that allows the *system* to use it when it's
> a partitioned
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Sorry, I
> didn't get your point. What do you mean by *system*?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > This sentence was a reply
> to:
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > 2. Make the `-partition-`
> string the keyword. That allows the user to use
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > it when
> it's a partitioned topic.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > I wanted to say that this
> sentence should be:
> > > > > > > > > > > > > > > > > > > > > > > > > Make the `-partition-`
> string the keyword, that allows the *system* to use
> > > > > > > > > > > > > > > > > > > > > > > > > it when it's a partitioned
> topic.
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > Why postfix of `__`?Why uppercase ?Maybe
> `__system__<name>`?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Yes, That
> is a key point that I want to discuss in this
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > thread.
> `__system__<name>` is good for me.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > Can you please elaborate what it means to make it
> dynamic exactly?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Sorry, I
> will refine it. it means we can update this configuration
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> dynamically. (using rest api or sth)
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > I'm unfamiliar with how
> Pulsar supports dynamic configuration. I would
> > > > > > > > > > > > > > > > > > > > > > > > > love it if you can share a
> link or explain it briefly, thus explaining what
> > > > > > > > > > > > > > > > > > > > > > > > > exactly you are going to
> change to support dynamic configuration.
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > General
> question: In the last thread you said something about
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> configurablerules, etc? You decided not to use this idea?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > IMO, That
> idea is an advanced feature. we may need more time to discuss
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > the
> details and for the topic name restriction, maybe we don't have strong
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > reason to
> use that.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > We can
> introduce this advanced feature when we have a need for it.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > WDYT?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > I agree. Future PIP and
> discussion.
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best,
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Mattison
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Feb 13,
> 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > You mean that allows the *system* to use it when it's
> a partitioned
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
>

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by ma...@gmail.com.
Hi, All

After discussing with Enrico and Michael offline.
I will split the discussed topic into two PIP.

1. Topic name restrictions
    a. `-partition-` keyword.
    b. enable topic name character pattern.
2. System topic
    a. System topic name pattern.
    b. System topic authorisation.
    c. ...

In this approach, we will get a clear boundary and avoid going off the initial scope.

Since we don't have any question about the first scope. I will start vote next week.

Thanks to all participant.

Best,
Mattison



On Feb 18, 2023, 14:24 +0800, Michael Marshall <mm...@apache.org>, wrote:
> I support breaking this into two PIPs. It was my fault the two PIPs
> were merged in the first place. I am sorry if I created any confusion.
> My intention was only to point out that names are a meaningful way to
> simplify logic, and we should reserve certain names for Pulsar's own
> usage with a well defined pattern so that we can simplify lifecycle
> operations.
>
> Thanks,
> Michael
>
> On Fri, Feb 17, 2023 at 1:55 AM Enrico Olivelli <eo...@gmail.com> wrote:
> >
> > Mattison,
> >
> > Il giorno gio 16 feb 2023 alle ore 00:27 <ma...@gmail.com> ha scritto:
> > > >
> > > > > > I am sorry but I am not sure that this is enough to preventreads/writes from unallowed clients.
> > > > IMO, We can consider the authorisation part in another PIP because We are just focusing on adding the topic name constraint of topic creation.
> > > >
> > > > Maybe we can use another PIP to clearify all of system topic's behaviour, like authorisation something.
> > > > e.g. we just allow superusers to read/write the data to that system topic.
> > > > > > We should elaborate more on this topic on the PIP
> > > > I will add the internal system topic creation logic in the PIP.
> > Why do you think that this is enough ?
> >
> > I think that we are going off the initial scope of the PIP.
> > The initial problem is about preventing clients from creating topics
> > that contain the "-partition-" keyword.
> >
> > I totally agree that there must be a clear way to distinguish topics
> > that are not meant to be accessed by "regular clients".
> >
> > The answer is in Micheal's words: only super users are allowed to
> > access topics that are not meant to be accessed by clients.
> > Broker to Broker communications are always running with a "super user"
> > role, so it is not a problem.
> >
> > BTW I wonder if it is better to narrow down the scope of the PIP and
> > go back to "-partition-"
> >
> >
> > Enrico
> >
> >
> > > >
> > > > Best,
> > > > Mattison
> > > > On Feb 16, 2023, 00:41 +0800, Enrico Olivelli <eo...@gmail.com>, wrote:
> > > > > > Il giorno mer 15 feb 2023 alle ore 17:07 <ma...@gmail.com> ha scritto:
> > > > > > > >
> > > > > > > > Hi Enrico
> > > > > > > >
> > > > > > > > I think it's a good question. We can introduce a new method in the BrokerService to help brokers create the topic internally first(maybe just metadata is enough), and then to use a pulsar client to connect to it.
> > > > > >
> > > > > > I am sorry but I am not sure that this is enough to prevent
> > > > > > reads/writes from unallowed clients.
> > > > > > We should elaborate more on this topic on the PIP
> > > > > >
> > > > > > Enrico
> > > > > >
> > > > > > > >
> > > > > > > > WDYT?
> > > > > > > >
> > > > > > > >
> > > > > > > > Best,
> > > > > > > > Mattison
> > > > > > > > On Feb 16, 2023, 00:01 +0800, Enrico Olivelli <eo...@gmail.com>, wrote:
> > > > > > > > > > > > I have one question (apologies for the top posting).
> > > > > > > > > > > >
> > > > > > > > > > > > The Broker (and the other Pulsar components) use the regular Pulsar
> > > > > > > > > > > > client to connect to "system topics"
> > > > > > > > > > > > and in general they use the Pulsar wire protocol.
> > > > > > > > > > > >
> > > > > > > > > > > > The question is "how do you distinguish an internal component from a
> > > > > > > > > > > > user component ?"
> > > > > > > > > > > > How can you say that the broker is able to connect to a system topic
> > > > > > > > > > > > and any other client cannot do it ?
> > > > > > > > > > > >
> > > > > > > > > > > > Enrico
> > > > > > > > > > > >
> > > > > > > > > > > > Il giorno mer 15 feb 2023 alle ore 15:38 <ma...@gmail.com> ha scritto:
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Hi Asaf
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > There is a link to introduce the dynamic configuration.
> > > > > > > > > > > > > > > > https://pulsar.apache.org/docs/2.10.x/admin-api-brokers/#dynamic-broker-configuration
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Best,
> > > > > > > > > > > > > > > > Mattison
> > > > > > > > > > > > > > > > On Feb 14, 2023, 17:06 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > > > > > > > > > > > > > > > > > > > > > On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:
> > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, Asaf
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Welcome to join this discussion.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Sorry, I didn't get your point. What do you mean by *system*?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > This sentence was a reply to:
> > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > 2. Make the `-partition-` string the keyword. That allows the user to use
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > it when it's a partitioned topic.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > I wanted to say that this sentence should be:
> > > > > > > > > > > > > > > > > > > > > > > > Make the `-partition-` string the keyword, that allows the *system* to use
> > > > > > > > > > > > > > > > > > > > > > > > it when it's a partitioned topic.
> > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Yes, That is a key point that I want to discuss in this
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > thread. `__system__<name>` is good for me.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Can you please elaborate what it means to make it dynamic exactly?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Sorry, I will refine it. it means we can update this configuration
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > dynamically. (using rest api or sth)
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > I'm unfamiliar with how Pulsar supports dynamic configuration. I would
> > > > > > > > > > > > > > > > > > > > > > > > love it if you can share a link or explain it briefly, thus explaining what
> > > > > > > > > > > > > > > > > > > > > > > > exactly you are going to change to support dynamic configuration.
> > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > General question: In the last thread you said something about
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > configurablerules, etc? You decided not to use this idea?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > IMO, That idea is an advanced feature. we may need more time to discuss
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > the details and for the topic name restriction, maybe we don't have strong
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > reason to use that.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > We can introduce this advanced feature when we have a need for it.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > WDYT?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > I agree. Future PIP and discussion.
> > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best,
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Mattison
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by Michael Marshall <mm...@apache.org>.
I support breaking this into two PIPs. It was my fault the two PIPs
were merged in the first place. I am sorry if I created any confusion.
My intention was only to point out that names are a meaningful way to
simplify logic, and we should reserve certain names for Pulsar's own
usage with a well defined pattern so that we can simplify lifecycle
operations.

Thanks,
Michael

On Fri, Feb 17, 2023 at 1:55 AM Enrico Olivelli <eo...@gmail.com> wrote:
>
> Mattison,
>
> Il giorno gio 16 feb 2023 alle ore 00:27 <ma...@gmail.com> ha scritto:
> >
> > > I am sorry but I am not sure that this is enough to preventreads/writes from unallowed clients.
> > IMO, We can consider the authorisation part in another PIP because We are just focusing on adding the topic name constraint of topic creation.
> >
> > Maybe we can use another PIP to clearify all of system topic's behaviour, like authorisation something.
> > e.g. we just allow superusers to read/write the data to that system topic.
> > > We should elaborate more on this topic on the PIP
> > I will add the internal system topic creation logic in the PIP.
> Why do you think that this is enough ?
>
> I think that we are going off the initial scope of the PIP.
> The initial problem is about preventing clients from creating topics
> that contain the "-partition-" keyword.
>
> I totally agree that there must be a clear way to distinguish topics
> that are not meant to be accessed by "regular clients".
>
> The answer is in Micheal's words: only super users are allowed to
> access topics that are not meant to be accessed by clients.
> Broker to Broker communications are always running with a "super user"
> role, so it is not a problem.
>
> BTW I wonder if it is better to narrow down the scope of the PIP and
> go back to "-partition-"
>
>
> Enrico
>
>
> >
> > Best,
> > Mattison
> > On Feb 16, 2023, 00:41 +0800, Enrico Olivelli <eo...@gmail.com>, wrote:
> > > Il giorno mer 15 feb 2023 alle ore 17:07 <ma...@gmail.com> ha scritto:
> > > >
> > > > Hi Enrico
> > > >
> > > > I think it's a good question. We can introduce a new method in the BrokerService to help brokers create the topic internally first(maybe just metadata is enough), and then to use a pulsar client to connect to it.
> > >
> > > I am sorry but I am not sure that this is enough to prevent
> > > reads/writes from unallowed clients.
> > > We should elaborate more on this topic on the PIP
> > >
> > > Enrico
> > >
> > > >
> > > > WDYT?
> > > >
> > > >
> > > > Best,
> > > > Mattison
> > > > On Feb 16, 2023, 00:01 +0800, Enrico Olivelli <eo...@gmail.com>, wrote:
> > > > > > I have one question (apologies for the top posting).
> > > > > >
> > > > > > The Broker (and the other Pulsar components) use the regular Pulsar
> > > > > > client to connect to "system topics"
> > > > > > and in general they use the Pulsar wire protocol.
> > > > > >
> > > > > > The question is "how do you distinguish an internal component from a
> > > > > > user component ?"
> > > > > > How can you say that the broker is able to connect to a system topic
> > > > > > and any other client cannot do it ?
> > > > > >
> > > > > > Enrico
> > > > > >
> > > > > > Il giorno mer 15 feb 2023 alle ore 15:38 <ma...@gmail.com> ha scritto:
> > > > > > > >
> > > > > > > > Hi Asaf
> > > > > > > >
> > > > > > > > There is a link to introduce the dynamic configuration.
> > > > > > > > https://pulsar.apache.org/docs/2.10.x/admin-api-brokers/#dynamic-broker-configuration
> > > > > > > >
> > > > > > > > Best,
> > > > > > > > Mattison
> > > > > > > > On Feb 14, 2023, 17:06 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > > > > > > > > > On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > > > > Hi, Asaf
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Welcome to join this discussion.
> > > > > > > > > > > > > > > > > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > > > > Sorry, I didn't get your point. What do you mean by *system*?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > This sentence was a reply to:
> > > > > > > > > > > >
> > > > > > > > > > > > 2. Make the `-partition-` string the keyword. That allows the user to use
> > > > > > > > > > > > > > > > it when it's a partitioned topic.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > I wanted to say that this sentence should be:
> > > > > > > > > > > > Make the `-partition-` string the keyword, that allows the *system* to use
> > > > > > > > > > > > it when it's a partitioned topic.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> > > > > > > > > > > > > > > > Yes, That is a key point that I want to discuss in this
> > > > > > > > > > > > > > > > thread. `__system__<name>` is good for me.
> > > > > > > > > > > > > > > > > > > > > > > > Can you please elaborate what it means to make it dynamic exactly?
> > > > > > > > > > > > > > > > Sorry, I will refine it. it means we can update this configuration
> > > > > > > > > > > > > > > > dynamically. (using rest api or sth)
> > > > > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > I'm unfamiliar with how Pulsar supports dynamic configuration. I would
> > > > > > > > > > > > love it if you can share a link or explain it briefly, thus explaining what
> > > > > > > > > > > > exactly you are going to change to support dynamic configuration.
> > > > > > > > > > > >
> > > > > > > > > > > > > > > > General question: In the last thread you said something about
> > > > > > > > > > > > > > > > configurablerules, etc? You decided not to use this idea?
> > > > > > > > > > > > > > > > IMO, That idea is an advanced feature. we may need more time to discuss
> > > > > > > > > > > > > > > > the details and for the topic name restriction, maybe we don't have strong
> > > > > > > > > > > > > > > > reason to use that.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > We can introduce this advanced feature when we have a need for it.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > WDYT?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > I agree. Future PIP and discussion.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Best,
> > > > > > > > > > > > > > > > Mattison
> > > > > > > > > > > > > > > > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > > > > > > > > > > > > > > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > > > >

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by Enrico Olivelli <eo...@gmail.com>.
Mattison,

Il giorno gio 16 feb 2023 alle ore 00:27 <ma...@gmail.com> ha scritto:
>
> > I am sorry but I am not sure that this is enough to preventreads/writes from unallowed clients.
> IMO, We can consider the authorisation part in another PIP because We are just focusing on adding the topic name constraint of topic creation.
>
> Maybe we can use another PIP to clearify all of system topic's behaviour, like authorisation something.
> e.g. we just allow superusers to read/write the data to that system topic.
> > We should elaborate more on this topic on the PIP
> I will add the internal system topic creation logic in the PIP.
Why do you think that this is enough ?

I think that we are going off the initial scope of the PIP.
The initial problem is about preventing clients from creating topics
that contain the "-partition-" keyword.

I totally agree that there must be a clear way to distinguish topics
that are not meant to be accessed by "regular clients".

The answer is in Micheal's words: only super users are allowed to
access topics that are not meant to be accessed by clients.
Broker to Broker communications are always running with a "super user"
role, so it is not a problem.

BTW I wonder if it is better to narrow down the scope of the PIP and
go back to "-partition-"


Enrico


>
> Best,
> Mattison
> On Feb 16, 2023, 00:41 +0800, Enrico Olivelli <eo...@gmail.com>, wrote:
> > Il giorno mer 15 feb 2023 alle ore 17:07 <ma...@gmail.com> ha scritto:
> > >
> > > Hi Enrico
> > >
> > > I think it's a good question. We can introduce a new method in the BrokerService to help brokers create the topic internally first(maybe just metadata is enough), and then to use a pulsar client to connect to it.
> >
> > I am sorry but I am not sure that this is enough to prevent
> > reads/writes from unallowed clients.
> > We should elaborate more on this topic on the PIP
> >
> > Enrico
> >
> > >
> > > WDYT?
> > >
> > >
> > > Best,
> > > Mattison
> > > On Feb 16, 2023, 00:01 +0800, Enrico Olivelli <eo...@gmail.com>, wrote:
> > > > > I have one question (apologies for the top posting).
> > > > >
> > > > > The Broker (and the other Pulsar components) use the regular Pulsar
> > > > > client to connect to "system topics"
> > > > > and in general they use the Pulsar wire protocol.
> > > > >
> > > > > The question is "how do you distinguish an internal component from a
> > > > > user component ?"
> > > > > How can you say that the broker is able to connect to a system topic
> > > > > and any other client cannot do it ?
> > > > >
> > > > > Enrico
> > > > >
> > > > > Il giorno mer 15 feb 2023 alle ore 15:38 <ma...@gmail.com> ha scritto:
> > > > > > >
> > > > > > > Hi Asaf
> > > > > > >
> > > > > > > There is a link to introduce the dynamic configuration.
> > > > > > > https://pulsar.apache.org/docs/2.10.x/admin-api-brokers/#dynamic-broker-configuration
> > > > > > >
> > > > > > > Best,
> > > > > > > Mattison
> > > > > > > On Feb 14, 2023, 17:06 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > > > > > > > > On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:
> > > > > > > > > > >
> > > > > > > > > > > > > > > Hi, Asaf
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Welcome to join this discussion.
> > > > > > > > > > > > > > > > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > > > Sorry, I didn't get your point. What do you mean by *system*?
> > > > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > This sentence was a reply to:
> > > > > > > > > > >
> > > > > > > > > > > 2. Make the `-partition-` string the keyword. That allows the user to use
> > > > > > > > > > > > > > > it when it's a partitioned topic.
> > > > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > I wanted to say that this sentence should be:
> > > > > > > > > > > Make the `-partition-` string the keyword, that allows the *system* to use
> > > > > > > > > > > it when it's a partitioned topic.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> > > > > > > > > > > > > > > Yes, That is a key point that I want to discuss in this
> > > > > > > > > > > > > > > thread. `__system__<name>` is good for me.
> > > > > > > > > > > > > > > > > > > > > > > Can you please elaborate what it means to make it dynamic exactly?
> > > > > > > > > > > > > > > Sorry, I will refine it. it means we can update this configuration
> > > > > > > > > > > > > > > dynamically. (using rest api or sth)
> > > > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > I'm unfamiliar with how Pulsar supports dynamic configuration. I would
> > > > > > > > > > > love it if you can share a link or explain it briefly, thus explaining what
> > > > > > > > > > > exactly you are going to change to support dynamic configuration.
> > > > > > > > > > >
> > > > > > > > > > > > > > > General question: In the last thread you said something about
> > > > > > > > > > > > > > > configurablerules, etc? You decided not to use this idea?
> > > > > > > > > > > > > > > IMO, That idea is an advanced feature. we may need more time to discuss
> > > > > > > > > > > > > > > the details and for the topic name restriction, maybe we don't have strong
> > > > > > > > > > > > > > > reason to use that.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > We can introduce this advanced feature when we have a need for it.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > WDYT?
> > > > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > I agree. Future PIP and discussion.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Best,
> > > > > > > > > > > > > > > Mattison
> > > > > > > > > > > > > > > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > > > > > > > > > > > > > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > > >

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by ma...@gmail.com.
> I am sorry but I am not sure that this is enough to preventreads/writes from unallowed clients.
IMO, We can consider the authorisation part in another PIP because We are just focusing on adding the topic name constraint of topic creation.

Maybe we can use another PIP to clearify all of system topic's behaviour, like authorisation something.
e.g. we just allow superusers to read/write the data to that system topic.
> We should elaborate more on this topic on the PIP
I will add the internal system topic creation logic in the PIP.

Best,
Mattison
On Feb 16, 2023, 00:41 +0800, Enrico Olivelli <eo...@gmail.com>, wrote:
> Il giorno mer 15 feb 2023 alle ore 17:07 <ma...@gmail.com> ha scritto:
> >
> > Hi Enrico
> >
> > I think it's a good question. We can introduce a new method in the BrokerService to help brokers create the topic internally first(maybe just metadata is enough), and then to use a pulsar client to connect to it.
>
> I am sorry but I am not sure that this is enough to prevent
> reads/writes from unallowed clients.
> We should elaborate more on this topic on the PIP
>
> Enrico
>
> >
> > WDYT?
> >
> >
> > Best,
> > Mattison
> > On Feb 16, 2023, 00:01 +0800, Enrico Olivelli <eo...@gmail.com>, wrote:
> > > > I have one question (apologies for the top posting).
> > > >
> > > > The Broker (and the other Pulsar components) use the regular Pulsar
> > > > client to connect to "system topics"
> > > > and in general they use the Pulsar wire protocol.
> > > >
> > > > The question is "how do you distinguish an internal component from a
> > > > user component ?"
> > > > How can you say that the broker is able to connect to a system topic
> > > > and any other client cannot do it ?
> > > >
> > > > Enrico
> > > >
> > > > Il giorno mer 15 feb 2023 alle ore 15:38 <ma...@gmail.com> ha scritto:
> > > > > >
> > > > > > Hi Asaf
> > > > > >
> > > > > > There is a link to introduce the dynamic configuration.
> > > > > > https://pulsar.apache.org/docs/2.10.x/admin-api-brokers/#dynamic-broker-configuration
> > > > > >
> > > > > > Best,
> > > > > > Mattison
> > > > > > On Feb 14, 2023, 17:06 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > > > > > > > On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:
> > > > > > > > > >
> > > > > > > > > > > > > > Hi, Asaf
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Welcome to join this discussion.
> > > > > > > > > > > > > > > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > > Sorry, I didn't get your point. What do you mean by *system*?
> > > > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > This sentence was a reply to:
> > > > > > > > > >
> > > > > > > > > > 2. Make the `-partition-` string the keyword. That allows the user to use
> > > > > > > > > > > > > > it when it's a partitioned topic.
> > > > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > I wanted to say that this sentence should be:
> > > > > > > > > > Make the `-partition-` string the keyword, that allows the *system* to use
> > > > > > > > > > it when it's a partitioned topic.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> > > > > > > > > > > > > > Yes, That is a key point that I want to discuss in this
> > > > > > > > > > > > > > thread. `__system__<name>` is good for me.
> > > > > > > > > > > > > > > > > > > > > > Can you please elaborate what it means to make it dynamic exactly?
> > > > > > > > > > > > > > Sorry, I will refine it. it means we can update this configuration
> > > > > > > > > > > > > > dynamically. (using rest api or sth)
> > > > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > I'm unfamiliar with how Pulsar supports dynamic configuration. I would
> > > > > > > > > > love it if you can share a link or explain it briefly, thus explaining what
> > > > > > > > > > exactly you are going to change to support dynamic configuration.
> > > > > > > > > >
> > > > > > > > > > > > > > General question: In the last thread you said something about
> > > > > > > > > > > > > > configurablerules, etc? You decided not to use this idea?
> > > > > > > > > > > > > > IMO, That idea is an advanced feature. we may need more time to discuss
> > > > > > > > > > > > > > the details and for the topic name restriction, maybe we don't have strong
> > > > > > > > > > > > > > reason to use that.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > We can introduce this advanced feature when we have a need for it.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > WDYT?
> > > > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > I agree. Future PIP and discussion.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Best,
> > > > > > > > > > > > > > Mattison
> > > > > > > > > > > > > > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > > > > > > > > > > > > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > > > > > > > > > topic?
> > > > > > > > > > > > > >

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by Enrico Olivelli <eo...@gmail.com>.
Il giorno mer 15 feb 2023 alle ore 17:07 <ma...@gmail.com> ha scritto:
>
> Hi Enrico
>
> I think it's a good question. We can introduce a new method in the BrokerService to help brokers create the topic internally first(maybe just metadata is enough), and then to use a pulsar client to connect to it.

I am sorry but I am not sure that this is enough to prevent
reads/writes from unallowed clients.
We should elaborate more on this topic on the PIP

Enrico

>
> WDYT?
>
>
> Best,
> Mattison
> On Feb 16, 2023, 00:01 +0800, Enrico Olivelli <eo...@gmail.com>, wrote:
> > I have one question (apologies for the top posting).
> >
> > The Broker (and the other Pulsar components) use the regular Pulsar
> > client to connect to "system topics"
> > and in general they use the Pulsar wire protocol.
> >
> > The question is "how do you distinguish an internal component from a
> > user component ?"
> > How can you say that the broker is able to connect to a system topic
> > and any other client cannot do it ?
> >
> > Enrico
> >
> > Il giorno mer 15 feb 2023 alle ore 15:38 <ma...@gmail.com> ha scritto:
> > >
> > > Hi Asaf
> > >
> > > There is a link to introduce the dynamic configuration.
> > > https://pulsar.apache.org/docs/2.10.x/admin-api-brokers/#dynamic-broker-configuration
> > >
> > > Best,
> > > Mattison
> > > On Feb 14, 2023, 17:06 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > > On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:
> > > > >
> > > > > > > Hi, Asaf
> > > > > > >
> > > > > > > Welcome to join this discussion.
> > > > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > > topic?
> > > > > > > Sorry, I didn't get your point. What do you mean by *system*?
> > > > > > >
> > > > >
> > > > > This sentence was a reply to:
> > > > >
> > > > > 2. Make the `-partition-` string the keyword. That allows the user to use
> > > > > > > it when it's a partitioned topic.
> > > > > > >
> > > > >
> > > > > I wanted to say that this sentence should be:
> > > > > Make the `-partition-` string the keyword, that allows the *system* to use
> > > > > it when it's a partitioned topic.
> > > > >
> > > > >
> > > > >
> > > > > > > > > > > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> > > > > > > Yes, That is a key point that I want to discuss in this
> > > > > > > thread. `__system__<name>` is good for me.
> > > > > > > > > > > Can you please elaborate what it means to make it dynamic exactly?
> > > > > > > Sorry, I will refine it. it means we can update this configuration
> > > > > > > dynamically. (using rest api or sth)
> > > > > > >
> > > > >
> > > > > I'm unfamiliar with how Pulsar supports dynamic configuration. I would
> > > > > love it if you can share a link or explain it briefly, thus explaining what
> > > > > exactly you are going to change to support dynamic configuration.
> > > > >
> > > > > > > General question: In the last thread you said something about
> > > > > > > configurablerules, etc? You decided not to use this idea?
> > > > > > > IMO, That idea is an advanced feature. we may need more time to discuss
> > > > > > > the details and for the topic name restriction, maybe we don't have strong
> > > > > > > reason to use that.
> > > > > > >
> > > > > > > We can introduce this advanced feature when we have a need for it.
> > > > > > >
> > > > > > > WDYT?
> > > > > > >
> > > > >
> > > > > I agree. Future PIP and discussion.
> > > > >
> > > > >
> > > > > > >
> > > > > > > Best,
> > > > > > > Mattison
> > > > > > > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > > topic?
> > > > > > >

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by ma...@gmail.com.
Hi Enrico

I think it's a good question. We can introduce a new method in the BrokerService to help brokers create the topic internally first(maybe just metadata is enough), and then to use pulsar client connect to it.

WDYT?


Best,
Mattison
On Feb 16, 2023, 00:01 +0800, Enrico Olivelli <eo...@gmail.com>, wrote:
> I have one question (apologies for the top posting).
>
> The Broker (and the other Pulsar components) use the regular Pulsar
> client to connect to "system topics"
> and in general they use the Pulsar wire protocol.
>
> The question is "how do you distinguish an internal component from a
> user component ?"
> How can you say that the broker is able to connect to a system topic
> and any other client cannot do it ?
>
> Enrico
>
> Il giorno mer 15 feb 2023 alle ore 15:38 <ma...@gmail.com> ha scritto:
> >
> > Hi Asaf
> >
> > There is a link to introduce the dynamic configuration.
> > https://pulsar.apache.org/docs/2.10.x/admin-api-brokers/#dynamic-broker-configuration
> >
> > Best,
> > Mattison
> > On Feb 14, 2023, 17:06 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:
> > > >
> > > > > > Hi, Asaf
> > > > > >
> > > > > > Welcome to join this discussion.
> > > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > topic?
> > > > > > Sorry, I didn't get your point. What do you mean by *system*?
> > > > > >
> > > >
> > > > This sentence was a reply to:
> > > >
> > > > 2. Make the `-partition-` string the keyword. That allows the user to use
> > > > > > it when it's a partitioned topic.
> > > > > >
> > > >
> > > > I wanted to say that this sentence should be:
> > > > Make the `-partition-` string the keyword, that allows the *system* to use
> > > > it when it's a partitioned topic.
> > > >
> > > >
> > > >
> > > > > > > > > > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> > > > > > Yes, That is a key point that I want to discuss in this
> > > > > > thread. `__system__<name>` is good for me.
> > > > > > > > > > Can you please elaborate what it means to make it dynamic exactly?
> > > > > > Sorry, I will refine it. it means we can update this configuration
> > > > > > dynamically. (using rest api or sth)
> > > > > >
> > > >
> > > > I'm unfamiliar with how Pulsar supports dynamic configuration. I would
> > > > love it if you can share a link or explain it briefly, thus explaining what
> > > > exactly you are going to change to support dynamic configuration.
> > > >
> > > > > > General question: In the last thread you said something about
> > > > > > configurablerules, etc? You decided not to use this idea?
> > > > > > IMO, That idea is an advanced feature. we may need more time to discuss
> > > > > > the details and for the topic name restriction, maybe we don't have strong
> > > > > > reason to use that.
> > > > > >
> > > > > > We can introduce this advanced feature when we have a need for it.
> > > > > >
> > > > > > WDYT?
> > > > > >
> > > >
> > > > I agree. Future PIP and discussion.
> > > >
> > > >
> > > > > >
> > > > > > Best,
> > > > > > Mattison
> > > > > > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > > > > > > > You mean that allows the *system* to use it when it's a partitioned
> > > > > > topic?
> > > > > >

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by Enrico Olivelli <eo...@gmail.com>.
I have one question (apologies for the top posting).

The Broker (and the other Pulsar components) use the regular Pulsar
client to connect to "system topics"
and in general they use the Pulsar wire protocol.

The question is "how do you distinguish an internal component from a
user component ?"
How can you say that the broker is able to connect to a system topic
and any other client cannot do it ?

Enrico

Il giorno mer 15 feb 2023 alle ore 15:38 <ma...@gmail.com> ha scritto:
>
> Hi Asaf
>
> There is a link to introduce the dynamic configuration.
> https://pulsar.apache.org/docs/2.10.x/admin-api-brokers/#dynamic-broker-configuration
>
> Best,
> Mattison
> On Feb 14, 2023, 17:06 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:
> >
> > > Hi, Asaf
> > >
> > > Welcome to join this discussion.
> > > > > You mean that allows the *system* to use it when it's a partitioned
> > > topic?
> > > Sorry, I didn't get your point. What do you mean by *system*?
> > >
> >
> > This sentence was a reply to:
> >
> > 2. Make the `-partition-` string the keyword. That allows the user to use
> > > it when it's a partitioned topic.
> > >
> >
> > I wanted to say that this sentence should be:
> > Make the `-partition-` string the keyword, that allows the *system* to use
> > it when it's a partitioned topic.
> >
> >
> >
> > > > > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> > > Yes, That is a key point that I want to discuss in this
> > > thread. `__system__<name>` is good for me.
> > > > > Can you please elaborate what it means to make it dynamic exactly?
> > > Sorry, I will refine it. it means we can update this configuration
> > > dynamically. (using rest api or sth)
> > >
> >
> > I'm unfamiliar with how Pulsar supports dynamic configuration. I would
> > love it if you can share a link or explain it briefly, thus explaining what
> > exactly you are going to change to support dynamic configuration.
> >
> > > General question: In the last thread you said something about
> > > configurablerules, etc? You decided not to use this idea?
> > > IMO, That idea is an advanced feature. we may need more time to discuss
> > > the details and for the topic name restriction, maybe we don't have strong
> > > reason to use that.
> > >
> > > We can introduce this advanced feature when we have a need for it.
> > >
> > > WDYT?
> > >
> >
> > I agree. Future PIP and discussion.
> >
> >
> > >
> > > Best,
> > > Mattison
> > > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > > You mean that allows the *system* to use it when it's a partitioned
> > > topic?
> > >

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by ma...@gmail.com.
Hi Asaf

There is a link to introduce the dynamic configuration.
https://pulsar.apache.org/docs/2.10.x/admin-api-brokers/#dynamic-broker-configuration

Best,
Mattison
On Feb 14, 2023, 17:06 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:
>
> > Hi, Asaf
> >
> > Welcome to join this discussion.
> > > > You mean that allows the *system* to use it when it's a partitioned
> > topic?
> > Sorry, I didn't get your point. What do you mean by *system*?
> >
>
> This sentence was a reply to:
>
> 2. Make the `-partition-` string the keyword. That allows the user to use
> > it when it's a partitioned topic.
> >
>
> I wanted to say that this sentence should be:
> Make the `-partition-` string the keyword, that allows the *system* to use
> it when it's a partitioned topic.
>
>
>
> > > > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> > Yes, That is a key point that I want to discuss in this
> > thread. `__system__<name>` is good for me.
> > > > Can you please elaborate what it means to make it dynamic exactly?
> > Sorry, I will refine it. it means we can update this configuration
> > dynamically. (using rest api or sth)
> >
>
> I'm unfamiliar with how Pulsar supports dynamic configuration. I would
> love it if you can share a link or explain it briefly, thus explaining what
> exactly you are going to change to support dynamic configuration.
>
> > General question: In the last thread you said something about
> > configurablerules, etc? You decided not to use this idea?
> > IMO, That idea is an advanced feature. we may need more time to discuss
> > the details and for the topic name restriction, maybe we don't have strong
> > reason to use that.
> >
> > We can introduce this advanced feature when we have a need for it.
> >
> > WDYT?
> >
>
> I agree. Future PIP and discussion.
>
>
> >
> > Best,
> > Mattison
> > On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > > > You mean that allows the *system* to use it when it's a partitioned
> > topic?
> >

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by Asaf Mesika <as...@gmail.com>.
On Tue, Feb 14, 2023 at 3:46 AM <ma...@gmail.com> wrote:

> Hi, Asaf
>
> Welcome to join this discussion.
> > You mean that allows the *system* to use it when it's a partitioned
> topic?
> Sorry, I didn't get your point. What do you mean by *system*?
>

This sentence was a reply to:

2. Make the `-partition-` string the keyword. That allows the user to use
> it when it's a partitioned topic.
>

 I wanted to say that this sentence should be:
Make the `-partition-` string the keyword, that allows the *system* to use
it when it's a partitioned topic.



> > Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
> Yes, That is a key point that I want to discuss in this
> thread.  `__system__<name>` is good for me.
> > Can you please elaborate what it means to make it dynamic exactly?
> Sorry, I will refine it. it means we can update this configuration
> dynamically. (using rest api or sth)
>

I'm  unfamiliar with how Pulsar supports dynamic configuration. I would
love it if you can share a link or explain it briefly, thus explaining what
exactly you are going to change to support dynamic configuration.

> General question: In the last thread you said something about
> configurablerules, etc? You decided not to use this idea?
> IMO, That idea is an advanced feature. we may need more time to discuss
> the details and for the topic name restriction, maybe we don't have strong
> reason to use that.
>
> We can introduce this advanced feature when we have a need for it.
>
> WDYT?
>

I agree. Future PIP and discussion.


>
> Best,
> Mattison
> On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> > You mean that allows the *system* to use it when it's a partitioned
> topic?
>

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by ma...@gmail.com.
Hi, Asaf

Welcome to join this discussion.
> You mean that allows the *system* to use it when it's a partitioned topic?
Sorry, I didn't get your point. What do you mean by *system*?
> Why postfix of `__`?Why uppercase ?Maybe `__system__<name>`?
Yes, That is a key point that I want to discuss in this thread.  `__system__<name>` is good for me.
> Can you please elaborate what it means to make it dynamic exactly?
Sorry, I will refine it. it means we can update this configuration dynamically. (using rest api or sth)
> General question: In the last thread you said something about configurablerules, etc? You decided not to use this idea?
IMO, That idea is an advanced feature. we may need more time to discuss the details and for the topic name restriction, maybe we don't have strong reason to use that.

We can introduce this advanced feature when we have a need for it.

WDYT?

Best,
Mattison
On Feb 13, 2023, 22:21 +0800, Asaf Mesika <as...@gmail.com>, wrote:
> You mean that allows the *system* to use it when it's a partitioned topic?

Re: [DISCUSS] PIP-242 Topic name restrictions

Posted by Asaf Mesika <as...@gmail.com>.
On Sat, Feb 11, 2023 at 6:01 AM <ma...@gmail.com> wrote:

> Hi guys.
>
> This is the refined PIP-242 discussion thread. Because we have discussed
> some parts of this in another thread[0][1], we can start the standard PIP
> discussion to reach a detailed consensus.
>
> You can check here[2] to see the PIP.
>
>
> Best,
> Mattison
>
> [0] https://lists.apache.org/thread/5s4kop7qmxgpvsnh65s42r9mv7qc1pxt
> [1] https://lists.apache.org/thread/km7jp26zmnfj6t3hpq0rt77j7wvn45o6
> [2] https://github.com/apache/pulsar/issues/19239
>
> ---------- Paste the document to help quotes ----------
>
> ### Motivation
>
> Currently, the Apache Pulsar has no restrictions on the topic name. Even
> `system topics`, `partitioned topics` etc. which is confusing for our
> developers to identify whether this is a partition of a partitioned topic.
> Plus, we need to add more logic to be compatible with this special topic
> name. for example:
>
> - https://github.com/apache/pulsar/pull/19240
> - https://github.com/apache/pulsar/pull/19230
> - https://github.com/apache/pulsar/pull/19171
> - https://github.com/apache/pulsar/pull/19086
> - ...
>
> ### Goal
>
> This proposal aimed to add more restrictions for a topic name. that
> includes three parts as follows:
> 1. Using `NamedEntity` to validate the topic name characters.
> 2. Make the `-partition-` string the keyword. That allows the user to use
> it when it's a partitioned topic.
>

You mean that allows the *system* to use it when it's a partitioned topic?

3. Introduce the new system topic structure. `__SYS__<name>__`
>
>
> **Create a topic:**
> _no corresponding partitioned topic_
> - persistent://public/default/local-name (passed)
> - persistent://public/default/local-name-partition-z (rejected by keyword)
> - persistent://public/default/local-name-partition-0 (rejected by keyword)
>
> _Has corresponding partitioned topic, **partitions=2** and topic partition
> name is **persistent://public/default/local-name**_
>
> - persistent://public/default/local-name-partition-0 (passed, Because it
> is the partition topic's sub-partition)
> - persistent://public/default/local-name-partition-z (rejected by keyword)
> - persistent://public/default/local-name-partition-4 (rejected, Because it
> exceeds the number of maximum partitions)
>
> **Create a partitioned topic(topic metadata)**
>
> - persistent://public/default/local-name (passed)
> - persistent://public/default/local-name-partition-z (rejected by keyword)
> - persistent://public/default/local-name-partition-0 (rejected by keyword)
>
> ### Compatibility
>
> We will introduce the new configuration `enableStrictTopicName`  to
> support compatibility. Users can easily disable it to get rid of the
> restrictions.
>
> For the system topic names, I would like to keep the original names and
> introduce a new topic structure `__SYS__<name>__`
>
> I think we can spare those extra 3 characters :)
Why postfix of `__`?
Why uppercase ?

Maybe `__system__<name>`?
`

> ### API Changes
>
> Add a new configuration, `enableStrictTopicName=false`.
>
> ### Implementation
>
> 1. Add configuration `enableStrictTopicName=false` and make it dynamic.
>
Can you please elaborate what it means to make it dynamic exactly?


> 2. Add topic name validation by `NamedEntity`
> 3. Add partitioned topic rejection logic.
> 4. Add warning logs to inform users that we do not recommend creating
> topics that name with the restrictions name when users disable
> `enableStrictTopicName`.
> 5. Make `enableStrictTopicName=true` in the next major release. and mark
> that this config will be removed in the future.
>
>
General question: In the last thread you said something about configurable
rules, etc? You decided not to use this idea?