codelipenghui commented on code in PR #19841: URL: https://github.com/apache/pulsar/pull/19841#discussion_r1160358589
########## pulsar-common/src/main/java/org/apache/pulsar/common/naming/TopicName.java: ########## @@ -231,7 +231,7 @@ public String getEncodedLocalName() { } public TopicName getPartition(int index) { - if (index == -1 || this.toString().contains(PARTITIONED_TOPIC_SUFFIX)) { + if (index == -1 || this.toString().endsWith(PARTITIONED_TOPIC_SUFFIX + index)) { Review Comment: What I thought was the PR intent to allow the partitioned name can contain `-partition-` keyword to resolve the issue. But it will introduce a new unreasonable rule to the partitioned topic. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org