Jason918 commented on a change in pull request #12734:
URL: https://github.com/apache/pulsar/pull/12734#discussion_r748819700
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Producer.java
##########
@@ -138,6 +138,15 @@ public Producer(Topic topic, TransportCnx cnx, long
producerId, String producerN
this.clientAddress = cnx.clientSourceAddress();
}
+ private String parseRemoteClusterName(String producerName, boolean
isRemote) {
+ if (isRemote) {
+ String clusterName = producerName.split("\\.")[2];
+ return clusterName.contains(REPL_PRODUCER_NAME_DELIMITER)
+ ? clusterName.split(REPL_PRODUCER_NAME_DELIMITER)[1] :
clusterName;
Review comment:
Actually, I think previous `
clusterName.split(REPL_PRODUCER_NAME_DELIMITER)[0]` should be right.
For replicator A-->B, this producer is in cluster B, it's remoteCluster is A.
--
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]