You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by ss <yj...@163.com> on 2017/03/10 06:12:59 UTC
rocketmq send compress message
Hello
1、 The Rocketmq send compress message when the message size bigger than 4*1024 ,you choose JDK deflate algorithm and set default level is 5,I feel puzzled at this level, why 5? why not 4,,why not 3 .....,whether not lz4 replace defate?
2、In DefaultMessageStore#putMessage method :
long beginTime = this.getSystemClock().now();
PutMessageResult result = this.commitLog.putMessage(msg);
long eclipseTime = this.getSystemClock().now() - beginTime;
if (eclipseTime > 500) {
log.warn("putMessage not in lock eclipse time(ms)={}, bodyLength={}", eclipseTime, msg.getBody().length);
}
eclipseTime ? what do u mean?
Re: rocketmq send compress message
Posted by yukon <yu...@apache.org>.
Hi,
1. Level 5 is a compromise between best compression(9) and fastest
compression(1).
2. As the code logic implies, maybe elapsedTime is better, this is just a
stopwatch.
Hope this can help you.
Regards,
yukon
On Fri, Mar 10, 2017 at 2:12 PM, ss <yj...@163.com> wrote:
> Hello
> 1、 The Rocketmq send compress message when the message size bigger than
> 4*1024 ,you choose JDK deflate algorithm and set default level is
> 5,I feel puzzled at this level, why 5? why not 4,,why not 3
> .....,whether not lz4 replace defate?
> 2、In DefaultMessageStore#putMessage method :
> long beginTime = this.getSystemClock().now();
> PutMessageResult result = this.commitLog.putMessage(msg);
>
> long eclipseTime = this.getSystemClock().now() - beginTime;
> if (eclipseTime > 500) {
> log.warn("putMessage not in lock eclipse time(ms)={}, bodyLength={}",
> eclipseTime, msg.getBody().length);
> }
> eclipseTime ? what do u mean?