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

[Enhancement] batch send support compression 批量发送支持压缩 #8755

Open
1 task done
iamgd67 opened this issue Sep 26, 2024 · 0 comments · May be fixed by #8746
Open
1 task done

[Enhancement] batch send support compression 批量发送支持压缩 #8755

iamgd67 opened this issue Sep 26, 2024 · 0 comments · May be fixed by #8746

Comments

@iamgd67
Copy link
Contributor

iamgd67 commented Sep 26, 2024

Before Creating the Enhancement Request

  • I have confirmed that this should be classified as an enhancement rather than a bug/feature.

Summary

by default, DefaultMQProducer will compress message body when body length is longer than 4k, but if send with batch(send( Collection<Message> msgs)), message body are not compressed.
it's better compress each message body when average length of messages body in the batch is larger than 4k.

默认配置下,用DefaultMQProducer的send方法发送单条消息,消息体大于4MB会被压缩。但该压缩不支持批量消息,即用send( Collection<Message> msgs)发送的消息,造成io和磁盘空间的浪费。
希望批量发送接口也能支持压缩

Motivation

trade cpu over disk io and space
使用cpu换取io和磁盘空间,一般的文本消息可以节约成本和提高效率。

Describe the Solution You'd Like

compress each message body when average length of messages body in the batch is larger than 4k.
批量的消息大时可以压缩消息,与单条类似的机制

Describe Alternatives You've Considered

  1. 使用方自行压缩消息体
  2. 批量消息一起压缩,包括header和body

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant