Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix maxMessageSize not effective even if aligned with broker #381

Merged
merged 3 commits into from
Oct 20, 2020

Conversation

wuYin
Copy link
Contributor

@wuYin wuYin commented Oct 19, 2020

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

  • Make sure that the change passes the CI checks.

@wolfstudy wolfstudy requested review from merlimat and wolfstudy and removed request for merlimat October 19, 2020 11:58
@wolfstudy wolfstudy merged commit 85a9fe8 into apache:master Oct 20, 2020
@wuYin wuYin deleted the fix-max-message-size branch October 23, 2020 03:46
@wolfstudy wolfstudy added this to the 0.3.0 milestone Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants