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

 ##########
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
 ##########
 @@ -275,7 +280,10 @@ protected void handleConnected(CommandConnected 
connected) {
         }
 
         checkArgument(state == State.SentConnectFrame || state == 
State.Connecting);
-
+        int maxFrameSize = connected.getMaxMessageSize() - 10 * 1024;
+        NUMBER_OF_MAX_MESSAGE_SIZE.compareAndSet(this, 0, maxFrameSize);
 
 Review comment:
   This compare and set is not needed here. The `CommandConnected` is only 
received once, so we should just do the replace of the frame decoder.

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