rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[ISSUE #8755] batch send support compression

Open iamgd67 opened this issue 1 year ago • 7 comments

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.

iamgd67 avatar Sep 25 '24 03:09 iamgd67

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.

Files with missing lines Patch % Lines
...mq/client/impl/producer/DefaultMQProducerImpl.java 73.07% 4 Missing and 3 partials :warning:
...apache/rocketmq/common/message/MessageDecoder.java 33.33% 5 Missing and 1 partial :warning:
.../apache/rocketmq/test/factory/ConsumerFactory.java 0.00% 3 Missing :warning:
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.

codecov-commenter avatar Sep 25 '24 03:09 codecov-commenter

ping @lizhimins for review

iamgd67 avatar Sep 26 '24 09:09 iamgd67

ping @RongtongJin for review

iamgd67 avatar Sep 29 '24 06:09 iamgd67

  1. An integration test, verifying this feature from end-to-end, should be added.

lizhanhui avatar Sep 29 '24 08:09 lizhanhui

@lizhanhui integration test added and passed

iamgd67 avatar Sep 30 '24 06:09 iamgd67

ping @lollipopjin for review

iamgd67 avatar Oct 09 '24 03:10 iamgd67

ping @RongtongJin for review

iamgd67 avatar Oct 10 '24 02:10 iamgd67

@RongtongJin @fuyou001 @tianliuliu @lollipopjin @lizhanhui please review this, thanks.

iamgd67 avatar Oct 22 '24 02:10 iamgd67

@RongtongJin @fuyou001 @tianliuliu @lollipopjin @lizhanhui please review this, thanks.

iamgd67 avatar Nov 01 '24 08:11 iamgd67

anyone care?

iamgd67 avatar Sep 28 '25 01:09 iamgd67