HScarb commented on code in PR #4213: URL: https://github.com/apache/rocketmq/pull/4213#discussion_r859316822
########## common/src/main/java/org/apache/rocketmq/common/message/MessageDecoder.java: ########## @@ -163,7 +166,8 @@ public static byte[] encode(MessageExt messageExt, boolean needCompress) throws int storehostAddressLength = (sysFlag & MessageSysFlag.STOREHOSTADDRESS_V6_FLAG) == 0 ? 8 : 20; byte[] newBody = messageExt.getBody(); if (needCompress && (sysFlag & MessageSysFlag.COMPRESSED_FLAG) == MessageSysFlag.COMPRESSED_FLAG) { - newBody = UtilAll.compress(body, 5); + Compressor compressor = CompressorFactory.getCompressor(MessageSysFlag.getCompressionType(sysFlag)); + newBody = compressor.compress(body, 5); Review Comment: Do we need to get compress level from `System.getProperty(MixAll.MESSAGE_COMPRESS_LEVEL, "5")`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org