Interface PubSubPosition

All Superinterfaces:
Measurable
All Known Implementing Classes:
ApacheKafkaOffsetPosition, InMemoryPubSubPosition

public interface PubSubPosition extends Measurable
Represents a position of a message in a partition of a topic.
  • Method Details

    • getNumericOffset

      long getNumericOffset()
    • equals

      boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      int hashCode()
      Overrides:
      hashCode in class Object
    • getPositionWireFormat

      PubSubPositionWireFormat getPositionWireFormat()
      Position wrapper is used to wrap the position type and the position value. This is used to serialize and deserialize the position object when sending and receiving it over the wire.
      Returns:
      the position wrapper
    • getWireFormatBytes

      default ByteBuffer getWireFormatBytes()
      Returns the serialized wire format bytes of this position.
      Returns:
      byte array representing the position in wire format
    • getPositionFromWireFormat

      static PubSubPosition getPositionFromWireFormat(PubSubPositionWireFormat positionWireFormat)