rocketmq
rocketmq copied to clipboard
[ISSUE #8755] batch send support compression
closes #8755
Brief Description
by default, DefaultMQProducer will compress message body when body length is longer than 4k, but if send with batch(send( Collection<Message> msgs)), body are not compressed.
this pr compress each message body when average length is larger than 4k
How Did You Test This Change?
send and receive batch messages with 8k body(larger than 4k default compress length), check commit log content is compressed. consume message body is 8k length.
Codecov Report
Attention: Patch coverage is 57.89474% with 16 lines in your changes missing coverage. Please review.
Project coverage is 47.37%. Comparing base (
551c8c3) to head (156b9dd). Report is 84 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #8746 +/- ##
=============================================
- Coverage 47.40% 47.37% -0.04%
+ Complexity 11568 11553 -15
=============================================
Files 1282 1282
Lines 89864 89890 +26
Branches 11563 11568 +5
=============================================
- Hits 42603 42587 -16
- Misses 42020 42048 +28
- Partials 5241 5255 +14
| Flag | Coverage Δ | |
|---|---|---|
47.37% <57.89%> (-0.01%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
ping @lizhimins for review
ping @RongtongJin for review
- An integration test, verifying this feature from end-to-end, should be added.
@lizhanhui integration test added and passed
ping @lollipopjin for review
ping @RongtongJin for review
@RongtongJin @fuyou001 @tianliuliu @lollipopjin @lizhanhui please review this, thanks.
@RongtongJin @fuyou001 @tianliuliu @lollipopjin @lizhanhui please review this, thanks.
anyone care?