Class OffsetSpec

    • Constructor Detail

      • OffsetSpec

        public OffsetSpec()
    • Method Detail

      • latest

        public static OffsetSpec latest()
        Used to retrieve the latest offset of a partition
      • earliest

        public static OffsetSpec earliest()
        Used to retrieve the earliest offset of a partition
      • forTimestamp

        public static OffsetSpec forTimestamp​(long timestamp)
        Used to retrieve the earliest offset whose timestamp is greater than or equal to the given timestamp in the corresponding partition
        Parameters:
        timestamp - in milliseconds
      • maxTimestamp

        public static OffsetSpec maxTimestamp()
        Used to retrieve the offset with the largest timestamp of a partition as message timestamps can be specified client side this may not match the log end offset returned by LatestSpec