Package com.linkedin.venice.pubsub.api
Class PubSubMessageDeserializer
java.lang.Object
com.linkedin.venice.pubsub.api.PubSubMessageDeserializer
The class for deserializing messages from the pubsub specific message format to
PubSubMessage
-
Constructor Summary
ConstructorDescriptionPubSubMessageDeserializer
(KafkaValueSerializer valueSerializer, ObjectPool<KafkaMessageEnvelope> putEnvelopePool, ObjectPool<KafkaMessageEnvelope> updateEnvelopePool) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
deserialize
(PubSubTopicPartition topicPartition, byte[] keyBytes, byte[] valueBytes, PubSubMessageHeaders headers, Long position, Long timestamp) Deserialize a message from the pubsub specific message format to PubSubMessage.static PubSubMessageDeserializer
-
Constructor Details
-
PubSubMessageDeserializer
public PubSubMessageDeserializer(KafkaValueSerializer valueSerializer, ObjectPool<KafkaMessageEnvelope> putEnvelopePool, ObjectPool<KafkaMessageEnvelope> updateEnvelopePool)
-
-
Method Details
-
deserialize
public PubSubMessage<KafkaKey,KafkaMessageEnvelope, deserializeLong> (PubSubTopicPartition topicPartition, byte[] keyBytes, byte[] valueBytes, PubSubMessageHeaders headers, Long position, 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
-
getInstance
-