Skip to content

Commit

Permalink
config in rocketmq
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangying committed Oct 29, 2024
1 parent afff757 commit 758a7cb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pip/pip-389.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,16 @@ In our test, we found that compressing small messages can is meaningless. The co
The relevant description in the official documentation:
>The smaller the amount of data to compress, the more difficult it is to compress. This problem is common to all compression algorithms. [1]
The similar configuration in RocketMQ is `compressMsgBodyOverHowmuch`[2]:
>/**
>* Compress message body threshold, namely, message body larger than 4k will be compressed on default.
>*/
>private int compressMsgBodyOverHowmuch = 1024 * 4;
[0] https://pulsar.apache.org/docs/4.0.x/concepts-messaging/#compression
[1] https://github.com/facebook/zstd?tab=readme-ov-file#the-case-for-small-data-compression
[2] https://github.com/apache/rocketmq/blob/dd62ed0f3b16919adec5d5eece21a1050dc9c5a0/client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java#L117

# Motivation

The motivation of this PIP is to provide a way to improve the compression performance by skipping the compression of small messages.
Expand Down

0 comments on commit 758a7cb

Please sign in to comment.