nodece commented on code in PR #24652:
URL: https://github.com/apache/pulsar/pull/24652#discussion_r2575396697
##########
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:
@poorbarcode Good, I should use pulsarAdmin instead of pulsarClient, this is
better way.
--
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]