final boolean hasUnknownGeneration() {
        return generation.equals(Generation.NO_GENERATION);
    }
Check whether given generation id is matching the record within current generation.

@param generationId generation id
@return true if the two ids are matching.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java