massakam opened a new pull request, #1100: URL: https://github.com/apache/pulsar-client-go/pull/1100
### Motivation When producing a message, we can specify the `DisableReplication` option, and if set to true, the message is expected not to be replicated to remote clusters. However, this option currently does not work, and even if set to true, messages will be replicated to remote clusters. The following part is the cause of this issue. https://github.com/apache/pulsar-client-go/blob/ac9c1a6399336461d2d3ce1cdd31cac6debd5ed5/pulsar/producer_partition.go#L554-L559 If `DisableReplication` is true, `ReplicationClusters` is set to `__local__`. However, the metadata that is actually sent to the broker has already been constructed immediately before that. Therefore, there is no point in changing the value of `ReplicationClusters` here. The order of these two must be reversed. ### Modifications Construct the metadata after changing `ReplicationClusters` to `__local__`. ### Verifying this change - [ ] Make sure that the change passes the CI checks. -- 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]
