Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #8755] batch send support compression #8746

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

iamgd67
Copy link
Contributor

@iamgd67 iamgd67 commented Sep 25, 2024

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-commenter
Copy link

codecov-commenter commented Sep 25, 2024

Codecov Report

Attention: Patch coverage is 62.85714% with 13 lines in your changes missing coverage. Please review.

Project coverage is 47.35%. Comparing base (e2abbc3) to head (c99ff27).
Report is 7 commits behind head on develop.

Files with missing lines Patch % Lines
...mq/client/impl/producer/DefaultMQProducerImpl.java 73.07% 4 Missing and 3 partials ⚠️
...apache/rocketmq/common/message/MessageDecoder.java 33.33% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #8746      +/-   ##
=============================================
+ Coverage      47.32%   47.35%   +0.02%     
- Complexity     11545    11556      +11     
=============================================
  Files           1282     1282              
  Lines          89843    89888      +45     
  Branches       11556    11567      +11     
=============================================
+ Hits           42521    42567      +46     
+ Misses         42069    42065       -4     
- Partials        5253     5256       +3     
Flag Coverage Δ
47.35% <62.85%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iamgd67 iamgd67 changed the title batch send support compression [issues 8755] batch send support compression Sep 26, 2024
@iamgd67 iamgd67 changed the title [issues 8755] batch send support compression [ISSUE 8755] batch send support compression Sep 26, 2024
@iamgd67 iamgd67 changed the title [ISSUE 8755] batch send support compression [ISSUE #8755] batch send support compression Sep 26, 2024
@iamgd67
Copy link
Contributor Author

iamgd67 commented Sep 26, 2024

ping @lizhimins for review

@iamgd67
Copy link
Contributor Author

iamgd67 commented Sep 29, 2024

ping @RongtongJin for review

@lizhanhui
Copy link
Contributor

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

@iamgd67 iamgd67 force-pushed the feature/batch_send_compression branch from db375b6 to 3db2a85 Compare September 29, 2024 09:12
@iamgd67 iamgd67 force-pushed the feature/batch_send_compression branch from 3db2a85 to 22c8c07 Compare September 29, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] batch send support compression 批量发送支持压缩
3 participants