RobertIndie commented on code in PR #19540:
URL: https://github.com/apache/pulsar/pull/19540#discussion_r1112505757


##########
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyClientCnx.java:
##########
@@ -66,7 +65,7 @@ protected ByteBuf newConnectCommand() throws Exception {
         authenticationDataProvider = 
authentication.getAuthData(remoteHostName);
         AuthData authData = 
authenticationDataProvider.authenticate(AuthData.INIT_AUTH_DATA);
         return Commands.newConnect(authentication.getAuthMethodName(), 
authData, protocolVersion,
-                PulsarVersion.getVersion(), proxyToTargetBrokerAddress, 
clientAuthRole, clientAuthData,
+                proxyConnection.clientVersion, proxyToTargetBrokerAddress, 
clientAuthRole, clientAuthData,

Review Comment:
   The `clientVersion` here is different from the `protocol version`. There is 
another field called `protoclVersion` here:
   
https://github.com/apache/pulsar/blob/954f406fab03ce8858883335ce6d5a676bb45c92/pulsar-common/src/main/proto/PulsarApi.proto#L273
   The proxy will choose the lowest protocol version for itself and the client:
   
https://github.com/apache/pulsar/blob/954f406fab03ce8858883335ce6d5a676bb45c92/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java#L685-L687
   



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