Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-269

SerdeManager should pass through envelope objects if not modified

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.7.0
    • 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.

      Attachments

        1. SAMZA-269.patch
          4 kB
          Martin Kleppmann

        Activity

          People

            martinkl Martin Kleppmann
            martinkl Martin Kleppmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: