Class PubSubMessageDeserializer

java.lang.Object
com.linkedin.venice.pubsub.api.PubSubMessageDeserializer

public class PubSubMessageDeserializer extends Object
The class for deserializing messages from the pubsub specific message format to PubSubMessage
  • Constructor Details

  • Method Details

    • deserialize

      public DefaultPubSubMessage deserialize(PubSubTopicPartition topicPartition, byte[] keyBytes, byte[] valueBytes, PubSubMessageHeaders headers, PubSubPosition pubSubPosition, Long timestamp)
      Deserialize a message from the pubsub specific message format to PubSubMessage.
      Parameters:
      topicPartition - the topic partition from which the message was read
      keyBytes - the key bytes of the message
      valueBytes - the value bytes of the message
      headers - the headers of the message
      pubSubPosition - the position of the message in the topic partition
      timestamp - the timestamp of the message
      Returns:
      the deserialized PubSubMessage
    • close

      public void close()
    • getValueSerializer

      public KafkaValueSerializer getValueSerializer()
    • createDefaultDeserializer

      public static PubSubMessageDeserializer createDefaultDeserializer()
      Do not use the following default deserializer in production code as it does not support schema evolution properly. It is only provided for convenience in test code.
    • createOptimizedDeserializer

      public static PubSubMessageDeserializer createOptimizedDeserializer()
      Do not use the following default deserializer in production code as it does not support schema evolution properly. It is only provided for convenience in test code.