Package com.linkedin.venice.pubsub.api
Interface DefaultPubSubMessage
- All Superinterfaces:
Measurable,PubSubMessage<KafkaKey,KafkaMessageEnvelope, PubSubPosition>
- All Known Implementing Classes:
ImmutablePubSubMessage,PubSubHelper.MutableDefaultPubSubMessage
public interface DefaultPubSubMessage
extends PubSubMessage<KafkaKey,KafkaMessageEnvelope,PubSubPosition>
A default implementation of
PubSubMessage that represents a message in a pub-sub system
with a KafkaKey as the key, a KafkaMessageEnvelope as the value, and a
PubSubPosition to track the message's offset within the topic-partition.-
Method Summary
Methods inherited from interface com.linkedin.venice.memory.Measurable
getHeapSizeMethods inherited from interface com.linkedin.venice.pubsub.api.PubSubMessage
getOffset, getPartition, getPayloadSize, getPubSubMessageHeaders, getPubSubMessageTime, getTopic, getTopicName, getTopicPartition, isEndOfBootstrap
-
Method Details
-
getKey
KafkaKey getKey()Retrieves the key associated with this message.- Specified by:
getKeyin interfacePubSubMessage<KafkaKey,KafkaMessageEnvelope, PubSubPosition> - Returns:
- the
KafkaKeyrepresenting the message key.
-
getValue
KafkaMessageEnvelope getValue()Retrieves the value payload of this message.- Specified by:
getValuein interfacePubSubMessage<KafkaKey,KafkaMessageEnvelope, PubSubPosition> - Returns:
- the
KafkaMessageEnvelopecontaining the message data.
-
getPosition
PubSubPosition getPosition()Retrieves the position of this message within the underlying topic-partition.- Specified by:
getPositionin interfacePubSubMessage<KafkaKey,KafkaMessageEnvelope, PubSubPosition> - Returns:
- the
PubSubPositionrepresenting the message offset.
-