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
Modifier and TypeMethodDescriptiongetKey()
Retrieves the key associated with this message.default PubSubPosition
Retrieves the position of this message within the underlying topic-partition.getValue()
Retrieves the value payload of this message.Methods inherited from interface com.linkedin.venice.memory.Measurable
getHeapSize
Methods inherited from interface com.linkedin.venice.pubsub.api.PubSubMessage
getPartition, getPayloadSize, getPubSubMessageHeaders, getPubSubMessageTime, getTopic, getTopicName, getTopicPartition, isEndOfBootstrap
-
Method Details
-
getKey
KafkaKey getKey()Retrieves the key associated with this message.- Specified by:
getKey
in interfacePubSubMessage<KafkaKey,
KafkaMessageEnvelope, PubSubPosition> - Returns:
- the
KafkaKey
representing the message key.
-
getValue
KafkaMessageEnvelope getValue()Retrieves the value payload of this message.- Specified by:
getValue
in interfacePubSubMessage<KafkaKey,
KafkaMessageEnvelope, PubSubPosition> - Returns:
- the
KafkaMessageEnvelope
containing the message data.
-
getPosition
PubSubPosition getPosition()Retrieves the position of this message within the underlying topic-partition.- Returns:
- the
PubSubPosition
representing the message offset.
-
getOffset
- Specified by:
getOffset
in interfacePubSubMessage<KafkaKey,
KafkaMessageEnvelope, PubSubPosition> - Returns:
- position of this message within the underlying topic-partition.
-