poorbarcode commented on code in PR #24652:
URL: https://github.com/apache/pulsar/pull/24652#discussion_r2570884893


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/GeoPersistentReplicator.java:
##########
@@ -56,7 +63,115 @@ protected String getProducerName() {
     @Override
     protected CompletableFuture<Void> prepareCreateProducer() {
         if 
(brokerService.getPulsar().getConfig().isCreateTopicToRemoteClusterForReplication())
 {
-            return CompletableFuture.completedFuture(null);
+            TopicName completeTopicName = TopicName.get(localTopicName);
+            TopicName baseTopicName;
+            if (completeTopicName.isPartitioned()) {
+                baseTopicName = 
TopicName.get(completeTopicName.getPartitionedTopicName());
+            } else {
+                baseTopicName = completeTopicName;
+            }
+            // Set useFallbackForNonPIP344Brokers to true when mix of PIP-344 
and non-PIP-344 brokers are used, it
+            // can still work.
+            return 
client.getLookup().getPartitionedTopicMetadata(baseTopicName, false, true)

Review Comment:
   > Since we have pulsarAdmin object, can we use 
pulsar-admin.topics.getPartitionedTopicMetadataAsync here?
   
   I have modified the code, please review it. 
https://github.com/apache/pulsar/pull/24652/commits/f7d38d74f4ba8806882e9eba43b3c4dc3b626e8b



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