public int generationId() {
        return super.generation().generationId;
    }
Return the current generation. The generation refers to this worker's knowledge with
respect to which generation is the latest one and, therefore, this information is local.

@return the generation ID or -1 if no generation is defined
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/WorkerCoordinator.java