public OptionalLong highestPendingOffset() {
        if (pending.isEmpty()) {
            return OptionalLong.empty();
        } else {
            return OptionalLong.of(pending.lastKey());
        }
    }
Get the offset of the highest pending event, or empty if there are no pending
events.
server-common/src/main/java/org/apache/kafka/deferred/DeferredEventQueue.java