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
ConstructorsConstructorDescriptionPubSubMessageDeserializer
(KafkaValueSerializer valueSerializer, ObjectPool<KafkaMessageEnvelope> putEnvelopePool, ObjectPool<KafkaMessageEnvelope> updateEnvelopePool) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static PubSubMessageDeserializer
Do not use the following default deserializer in production code as it does not support schema evolution properly.static PubSubMessageDeserializer
Do not use the following default deserializer in production code as it does not support schema evolution properly.deserialize
(PubSubTopicPartition topicPartition, byte[] keyBytes, byte[] valueBytes, PubSubMessageHeaders headers, PubSubPosition pubSubPosition, Long timestamp) Deserialize a message from the pubsub specific message format to PubSubMessage.
-
Constructor Details
-
PubSubMessageDeserializer
public PubSubMessageDeserializer(KafkaValueSerializer valueSerializer, ObjectPool<KafkaMessageEnvelope> putEnvelopePool, ObjectPool<KafkaMessageEnvelope> updateEnvelopePool)
-
-
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 readkeyBytes
- the key bytes of the messagevalueBytes
- the value bytes of the messageheaders
- the headers of the messagepubSubPosition
- the position of the message in the topic partitiontimestamp
- the timestamp of the message- Returns:
- the deserialized PubSubMessage
-
close
public void close() -
getValueSerializer
-
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
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.
-