merlimat commented on code in PR #25304:
URL: https://github.com/apache/pulsar/pull/25304#discussion_r2925590596


##########
pulsar-common/src/main/java/org/apache/pulsar/common/naming/TopicName.java:
##########
@@ -133,40 +126,20 @@ private TopicName(String completeTopicName) {
                 }
             }
 
-            // The fully qualified topic name can be in two different forms:
-            // new:    persistent://tenant/namespace/topic
-            // legacy: persistent://tenant/cluster/namespace/topic
-
+            // Expected format: persistent://tenant/namespace/topic
             List<String> parts = 
Splitter.on("://").limit(2).splitToList(completeTopicName);
             this.domain = TopicDomain.getEnum(parts.get(0));
 
             String rest = parts.get(1);
 
-            // The rest of the name can be in different forms:
-            // new:    tenant/namespace/<localName>
-            // legacy: tenant/cluster/namespace/<localName>
-            // Examples of localName:
-            // 1. some, name, xyz
-            // 2. xyz-123, feeder-2
-
-
-            parts = Splitter.on("/").limit(4).splitToList(rest);
+            // Expected format: tenant/namespace/<localName>

Review Comment:
   @shibd 
   
   > So, with this limitation, it means we cannot allow / in topic names.
   
   V2 topic never allowed `/` in the local topic names. In all the cases these 
were interpreted by the parser as V1 topics (therefore the cluster/namespace 
was messed up in confusing ways). 
   
   This was done to not break compatibility in the v1->v2 coexistence 
transition, since v1 topic literally had no restrictions.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to