[Bug] Can create both partitioned and non-partitioned topics with the same name.
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Version
`3.0.2`
### Minimal reproduce step
Broker.conf
- `allowAutoTopicCreation`: `true`
- `allowAutoTopicCreationType`: `partitioned`
- `defaultNumPartitions`:`1`
The latest version of the Go client
- Create a consumer and subscribe `public/default/tp1`
- Broker will create a partitioned topic `public/default/tp1` with `1` partition at the step
- Create a reader and subscribe `public/default/tp1`
- Broker will create a non-partitioned topic `public/default/tp1`
Two bugs:
- the reader of the Go client should get topic metadata first, then try to subscribe to the partitioned topic. The actual behavior is it subscribes to the `public/default/tp1` as a non-partitioned topic. This bug will be fixed in https://github.com/apache/pulsar-client-go
- **(Highlight)**The Go client should get a not-found error when the reader tries to subscribe to `public/default/tp1` as a non-partitioned topic. This bug is the current issue point.
### What did you expect to see?
-
### What did you see instead?
-
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Assessment
This issue has not been assessed yet.