medoer commented on issue #6655:
URL: https://github.com/apache/rocketmq/issues/6655#issuecomment-1527123087
> I send transaction message of 4194303 bytes, but I don't reproduce the
problem. Can you show your client test code?
@Focus-rth
The issue is found in our production env twice with no limit of the message
body, but our broker maxMessageSize id 64KB.
But no limit on client.
I read the code and found the client will be compress the message body, so
you send the 4194303 bytes maybe not close to the broker's limit.
I can reproduce this in our local env, with modify the broker
maxMessageSize = 3072 and compress size to 512 bytes.
and send message one by one byte in a loop
`
byte[] by =
JSON.toJSONString(message.getPayload()).getBytes(StandardCharsets.UTF_8);
byte[] headerBytes =
JSON.toJSONString(message.getHeaders()).getBytes(StandardCharsets.UTF_8);
byte[] compress = UtilAll.compress(by, 5);
log.info("size: {}, compress size: {}, header size: {}", by.length,
compress.length, headerBytes.length);
if (compress.length > 1024 - 500) {
headers.put("KEYS", compress.length);
// send message
}`
<img width="1216" alt="image"
src="https://user-images.githubusercontent.com/20471718/235083476-1c535e48-30bc-4d3c-b296-86d8876b4046.png">
the logger
2023-04-27 08:57:18 ERROR TransactionalMessageCheckService -
PutBackToHalfQueueReturnResult write failed, topic: RMQ_SYS_TRANS_HALF_TOPIC,
queueId: 0, msgId: 0ADC043300002A9F000000000056C9ED
2023-04-27 08:57:18 ERROR TransactionalMessageCheckService -
PutBackToHalfQueueReturnResult write failed, topic: RMQ_SYS_TRANS_HALF_TOPIC,
queueId: 0, msgId: 0ADC043300002A9F000000000056C9ED
2023-04-27 08:57:18 ERROR TransactionalMessageCheckService -
PutBackToHalfQueueReturnResult write failed, topic: RMQ_SYS_TRANS_HALF_TOPIC,
queueId: 0, msgId: 0ADC043300002A9F000000000056C9ED
2023-04-27 08:57:18 ERROR TransactionalMessageCheckService -
PutBackToHalfQueueReturnResult write failed, topic: RMQ_SYS_TRANS_HALF_TOPIC,
queueId: 0, msgId: 0ADC043300002A9F000000000056C9ED
2023-04-27 08:57:18 ERROR TransactionalMessageCheckService -
PutBackToHalfQueueReturnResult write failed, topic: RMQ_SYS_TRANS_HALF_TOPIC,
queueId: 0, msgId: 0ADC043300002A9F000000000056C9ED
2023-04-27 08:57:18 ERROR TransactionalMessageCheckService -
PutBackToHalfQueueReturnResult write failed, topic: RMQ_SYS_TRANS_HALF_TOPIC,
queueId: 0, msgId: 0ADC043300002A9F000000000056C9ED
2023-04-27 08:57:18 ERROR TransactionalMessageCheckService -
PutBackToHalfQueueReturnResult write failed, topic: RMQ_SYS_TRANS_HALF_TOPIC,
queueId: 0, msgId: 0ADC043300002A9F000000000056C9ED
2023-04-27 08:57:18 ERROR TransactionalMessageCheckService -
PutBackToHalfQueueReturnResult write failed, topic: RMQ_SYS_TRANS_HALF_TOPIC,
queueId: 0, msgId: 0ADC043300002A9F000000000056C9ED
2023-04-27 08:57:18 ERROR TransactionalMessageCheckService -
PutBackToHalfQueueReturnResult write failed, topic: RMQ_SYS_TRANS_HALF_TOPIC,
queueId: 0, msgId: 0ADC043300002A9F000000000056C9ED
2023-04-27 08:57:18 ERROR TransactionalMessageCheckService -
PutBackToHalfQueueReturnResult write failed, topic: RMQ_SYS_TRANS_HALF_TOPIC,
queueId: 0, msgId: 0ADC043300002A9F000000000056C9ED
And I think maybe that's the problem
`msgInner.setTagsCode(MessageExtBrokerInner.tagsString2tagsCode(msgInner.getTags()))`
, this lead to more size than the client send
--
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]