Skip to content

[Bug] Check message size before message compression #9672

@Aresxue

Description

@Aresxue

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

All

RocketMQ version

All

JDK Version

All

Describe the Bug

The rocketmq client does both message size and message compression, but check message size before message compression.This makes it possible for a 5M message in the default configuration to be smaller than 4M by compression, but now you have to manually adjust the maxMessageSize parameter, which makes the semantics of the client and broker's check message size not match, please confirm this is a problem, I will submit a pr to fix it if necessary.

Steps to Reproduce

send a 5M message.

What Did You Expect to See?

If the size of a 5M message is smaller than 4M, the message can pass the verification.

What Did You See Instead?

A message that is 5M in size but smaller than 4M in size fails to pass the check.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions