Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
0.7.1
-
None
-
None
-
N/A
Description
When creating a gzipped MessageSet, the collection of Messages is passed to CompressionUtils.compress(), where each message is serialised [1] into a buffer (not just the payload, the full Message with headers, uncompressed), then gripped, and finally wrapped into another Message [2].
In other words, the consumer has to unwrap the Message flagged as gzipped, unzip the payload, and unwrap the unzipped payload again as a non-compressed Message.
Is this double-wrapping the intended behaviour?
[1] messages.foreach(m => m.serializeTo(messageByteBuffer))
[2] new Message(outputStream.toByteArray, compressionCodec)