You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Aresxue (via GitHub)" <gi...@apache.org> on 2024/01/17 08:51:34 UTC
[I] Check message size before message compression [rocketmq]
Aresxue opened a new issue, #7758:
URL: https://github.com/apache/rocketmq/issues/7758
### Before Creating the Bug Report
- [X] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions).
- [X] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/discussions) of this repository and believe that this is not a duplicate.
- [X] 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
At will
### 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_
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Check message size before message compression [rocketmq]
Posted by "zyhui98 (via GitHub)" <gi...@apache.org>.
zyhui98 commented on issue #7758:
URL: https://github.com/apache/rocketmq/issues/7758#issuecomment-1898102900
at 5.1.4 delay check message is about (header + body), but send to broke is only body. is also a problem.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Check message size before message compression [rocketmq]
Posted by "zyhui98 (via GitHub)" <gi...@apache.org>.
zyhui98 commented on issue #7758:
URL: https://github.com/apache/rocketmq/issues/7758#issuecomment-1898103926
@Aresxue yes, i think this is a problem
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Check message size before message compression [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7758:
URL: https://github.com/apache/rocketmq/issues/7758#issuecomment-2603389208
This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Check message size before message compression [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7758:
URL: https://github.com/apache/rocketmq/issues/7758#issuecomment-2611268794
This issue was closed because it has been inactive for 3 days since being marked as stale.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Check message size before message compression [rocketmq]
Posted by "francisoliverlee (via GitHub)" <gi...@apache.org>.
francisoliverlee commented on issue #7758:
URL: https://github.com/apache/rocketmq/issues/7758#issuecomment-1902566721
## Client's config key=maxMessageSize checked in Validators.checkMessage(msg, this.defaultMQProducer);
```java
if (msg.getBody().length > defaultMQProducer.getMaxMessageSize()) {
throw new MQClientException(ResponseCode.MESSAGE_ILLEGAL,
"the message body size over max value, MAX: " + defaultMQProducer.getMaxMessageSize());
}
```
- sync send one message, do body size check
- async send one message, do body size check
- sync send batch message, do 2 checks
- do every message body check
- do all message's body size check
- async send one message, do 2 checks
- do every message body check
- do all message's body size check
## Proxy check message body size

## Broker not check message size

## Store's config key=maxMessageSize checked in MessageExtEncoder.encode() WITH 2 checks

- body check
- header + body check
> at 5.1.4 delay check message is about (header + body), but send to broke is only body. is also a problem.
i found some size checks here but no delay message check, can you pls give out the code?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Check message size before message compression [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7758: Check message size before message compression
URL: https://github.com/apache/rocketmq/issues/7758
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org