public Optional<Integer> leaderEpoch() {
        return leaderEpoch;
    }
Get the leader epoch for the record if available

@return the leader epoch or empty for legacy record formats
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerRecord.java