Dream95 commented on code in PR #25921:
URL: https://github.com/apache/pulsar/pull/25921#discussion_r3353105766


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/TopicMessageIdImpl.java:
##########
@@ -92,6 +93,12 @@ public String getOwnerTopic() {
         return ownerTopic;
     }
 
+    @Override
+    public boolean hasSameBasePartitionedTopic(String topicName) {
+        return TopicName.get(getOwnerTopic()).getPartitionedTopicName()
+                .equals(TopicName.get(topicName).getPartitionedTopicName());
+    }

Review Comment:
   > move to TopicMessageId as the default implementation
   
   Since TopicMessageId lives in the pulsar-client-api module while TopicName 
lives in pulsar-common, and pulsar-common already depends on pulsar-client-api, 
adding a dependency on pulsar-common to pulsar-client-api would create a 
circular compile dependency.



##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/TopicMessageIdImpl.java:
##########
@@ -92,6 +93,12 @@ public String getOwnerTopic() {
         return ownerTopic;
     }
 
+    @Override
+    public boolean hasSameBasePartitionedTopic(String topicName) {
+        return TopicName.get(getOwnerTopic()).getPartitionedTopicName()
+                .equals(TopicName.get(topicName).getPartitionedTopicName());
+    }

Review Comment:
   Since TopicMessageId lives in the pulsar-client-api module while TopicName 
lives in pulsar-common, and pulsar-common already depends on pulsar-client-api, 
adding a dependency on pulsar-common to pulsar-client-api would create a 
circular compile dependency.



-- 
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