RockteMQ-AI commented on issue #11448: URL: https://github.com/apache/rocketmq/issues/11448#issuecomment-6221699398
**Issue Evaluation** Category: `type/enhancement` | Status: **Evaluated** **Feasibility:** Feasible — straightforward addition **Scope:** `common/compression` module (4 core files + tests) **Compatibility:** Forward-compat risk for older clients/brokers (same as when ZSTD was added) The existing compression infrastructure (`CompressionType` enum, `Compressor` interface, `CompressorFactory`) is well-designed for extension. Adding GZIP requires: 1. New `GzipCompressor.java` implementing `Compressor` (JDK `GZIPOutputStream`/`GZIPInputStream` — zero new dependencies) 2. Add `GZIP(4)` to `CompressionType` enum + `MessageSysFlag` constant 3. Register in `CompressorFactory` 4. Tests No changes needed in client/broker/store layers — producer resolves via `CompressionType.of()` + `getCompressionFlag()`, consumer decompresses via `MessageDecoder`/factory, broker stores opaque bytes. **Concerns:** - Older clients/brokers will throw `RuntimeException` on unknown compression type value 4 (same forward-compat pattern as ZSTD addition) - GZIP offers weaker ratio/speed than ZSTD/LZ4 — primary value is ecosystem interoperability (standard format supported by virtually every language/tool) Overall a clean, low-risk enhancement if the interop benefit is desired. --- *Automated evaluation by github-manager-bot* -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
