-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Description
BUG REPORT
- Please describe the issue you observed:
- What did you do (The steps to reproduce)?
1.use DefaultMQPushConsumer as consumer with enableMsgTrace set to true
2.set consumeMessageBatchMaxSize to 100
3.pull 1000 msgs at one time
- What is expected to see?
the message trace ability is ok - What did you see instead?
following exxception is thrown
- Please tell us about your environment:
version:4.9.3 - Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):
in org.apache.rocketmq.client.trace.AsyncTraceDispatcher class the traceProducer's maxMessageSize is set to 118K as following:
and when the flushData method is invoked, sometimes when the buffer is bigger than traceProducer.getMaxMessageSize() it will invoke the producer's send method to send trace message to broker
and before the producer prepare to send the message it will check the message's size, then the exception will occure
steps to fix it:
1.change the maxMessageSize of traceProducer to 128K
2.change the lower bound to 118K and leave 10K for the trace message
attached file is the test case of this exception
DefaultMQConsumerWithTraceBugTest.zip
ShannonDing, autumind, ferrirW and hzh0425