Hello everyone.
I hope you guys are all doing well.

I would like to start the discussion for PIP-242 
https://github.com/apache/pulsar/issues/19239,
Please let me know if you have any concerns or questions.

Best,
Mattison

------- Paste original PIP content to help quote ------

### Motivation

Currently, the Apache Pulsar broker allows users to create a topic name that 
includes `-partition-`, 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 wants `-partition-` to be a topic name keyword. Users can only 
create a topic with it if the topic is partitioned. For the compatibility 
reason, we want to Introduce a new configuration - `enableStrictTopicName` for 
the broker to help reject creating a topic in the following cases:
1. Create a partitioned topic that includes `-partition-`.
2. Create a topic which is not a partitioned topic.

### API Changes

Add a new configuration, `enableStrictTopicName=false`.

### Implementation

1. Add configuration `enableStrictTopicName=false`.
2. Add rejection logic when the user enables `enableStrictTopicName`.
3. Add warning logs to inform users that we do not recommend creating 
non-partitioned topics with the keyword `-partition-`.
4. Make `enableStrictTopicName=true` in the future.

Reply via email to