Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix maxMessageSize not effective even if aligned with broker (#381)
### Motivation - issue 1 If broker updated `maxMessageSize`, client's `maxMessageSize` will be the same after handshaking. However, client still use the default `maxMessageSize` while reading command from connection. Lead to consumer can't receive message which payload exceed 5MB. - issue 2 According to [PIP-36](https://github.com/apache/pulsar/wiki/PIP-36%3A-Max-Message-Size), default *Size should be: ``` maxMessageSize = 5MB framePaddingSize = 10KB maxFrameSize = maxMessageSize + framePaddingSize ``` But they two are confused currently: ``` maxFrameSize = 5MB framePaddingSize = 10KB maxMessageSize = maxFrameSize - framePaddingSize ``` ### Modifications - Use the aligned `maxMessageSize` instead of the default value. - Correct `maxMessageSize` default value. ### Verifying this change - [x] Make sure that the change passes the CI checks.
- Loading branch information