Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
class ConsumerRecord<K, V> {
  /** 
   * Get the leader epoch or empty if it is unknown. 
   */
  Optional<Integer> leaderEpoch();
}

class OffsetAndMetadata {
  /**
   * New constructor including optional leader epoch. Old constructors
   * will still be supported and will use Optional.empty() as the default
   * leader epoch.
   */
  OffsetAndMetadata(long offset, String metadata, Optional<Integer> leaderEpoch); 

  /** 
   * Get the leader epoch of the previously consumed offsetrecord (if one is known).
   * Log truncation is detected if thethere firstexists offseta of theleader epoch forwhich theis committedlarger
   * offset is larger than this epoch and begins at an offset earlier than the committed offset.
   */
  Optional<Integer> lastLeaderEpoch();
}

...