zymap commented on a change in pull request #4247: [WIP] PIP-36: Support set 
message size in broker.conf
URL: https://github.com/apache/pulsar/pull/4247#discussion_r284079724
 
 

 ##########
 File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/api/Commands.java
 ##########
 @@ -189,9 +194,16 @@ public static ByteBuf newConnect(String authMethodName, 
AuthData authData, int p
         return res;
     }
 
-    public static ByteBuf newConnected(int clientProtocolVersion) {
+    public static ByteBuf newConnected(int clientProtocoVersion) {
+        return newConnected(clientProtocoVersion, INVALID_MAX_MESSAGE_SIZE);
 
 Review comment:
   Because it will be used when there no max message size in protocol, like 
this:
   ```
   ChannelFuture channelFuture;
               if (connected.hasMaxMessageSize()) {
                   channelFuture = inboundChannel.writeAndFlush(
                       Commands.newConnected(connected.getProtocolVersion(), 
connected.getMaxMessageSize()));
               } else {
                   channelFuture = 
inboundChannel.writeAndFlush(Commands.newConnected(connected.getProtocolVersion()));
               }
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to