superhx commented on code in PR #6606:
URL: https://github.com/apache/rocketmq/pull/6606#discussion_r1174491063
##########
client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:
##########
@@ -534,6 +535,13 @@ public void executeAsyncMessageSend(Runnable runnable,
final Message msg, final
boolean isSemaphoreAsyncNumAquired = false;
boolean isSemaphoreAsyncSizeAquired = false;
int msgLen = msg.getBody() == null ? 1 : msg.getBody().length;
+ if (msgLen >
this.getDefaultMQProducer().getBackPressureForAsyncSendSize()) {
Review Comment:
那合理的改法应该是
1. 前面会有 maxMessageSize 的判断,返回 MESSAGE_ILLEGAL
2. 然后额外校验 backPressureForAsyncSendSize 和 maxMessageSize 的设置大小关系,避免
backPressureForAsyncSendSize < maxMessageSize
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]