Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.7.0
-
None
-
None
Description
In some cases, it can be useful for a SystemConsumer to define a custom IncomingMessageEnvelope subclass (or conversely, for a SystemProducer to define a custom OutgoingMessageEnvelope subclass) in order to carry system-specific metadata.
Unfortunately, the current implementation of org.apache.samza.serializers.SerdeManager always unpacks the envelope and creates a new envelope object. This is necessary if a serde is being used (since the key and message need to be replaced with the serialized/deserialized version of the same), but unnecessary if there is no serde. If there is no serde, it would be better to pass through the envelope unmodified.
This would probably also have a performance benefit, since we only have to allocate one, not two, envelope objects per message.