Package com.linkedin.venice.pubsub.api
Class PubSubMessageDeserializer
- java.lang.Object
-
- com.linkedin.venice.pubsub.api.PubSubMessageDeserializer
-
public class PubSubMessageDeserializer extends java.lang.Object
The class for deserializing messages from the pubsub specific message format toPubSubMessage
-
-
Constructor Summary
Constructors Constructor Description PubSubMessageDeserializer(KafkaValueSerializer valueSerializer, ObjectPool<KafkaMessageEnvelope> putEnvelopePool, ObjectPool<KafkaMessageEnvelope> updateEnvelopePool)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long>
deserialize(PubSubTopicPartition topicPartition, byte[] keyBytes, byte[] valueBytes, PubSubMessageHeaders headers, java.lang.Long position, java.lang.Long timestamp)
Deserialize a message from the pubsub specific message format to PubSubMessage.static PubSubMessageDeserializer
getInstance()
KafkaValueSerializer
getValueSerializer()
-
-
-
Constructor Detail
-
PubSubMessageDeserializer
public PubSubMessageDeserializer(KafkaValueSerializer valueSerializer, ObjectPool<KafkaMessageEnvelope> putEnvelopePool, ObjectPool<KafkaMessageEnvelope> updateEnvelopePool)
-
-
Method Detail
-
deserialize
public PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long> deserialize(PubSubTopicPartition topicPartition, byte[] keyBytes, byte[] valueBytes, PubSubMessageHeaders headers, java.lang.Long position, java.lang.Long timestamp)
Deserialize a message from the pubsub specific message format to PubSubMessage.- Parameters:
topicPartition
- the topic partition from which the message was readkeyBytes
- the key bytes of the messagevalueBytes
- the value bytes of the messageheaders
- the headers of the messageposition
- the position of the message in the topic partitiontimestamp
- the timestamp of the message- Returns:
- the deserialized PubSubMessage
-
close
public void close()
-
getValueSerializer
public KafkaValueSerializer getValueSerializer()
-
getInstance
public static PubSubMessageDeserializer getInstance()
-
-