public void transitionToStale() {
        transitionTo(MemberState.STALE);

        // Release assignment
        clearSubscription();
        log.debug("Member {} sent leave group heartbeat and released its assignment. It will remain " +
                        "in {} state until the poll timer is reset, and it will then rejoin the group",
                memberId, MemberState.STALE);
    }
Sets the epoch to the leave group epoch and clears the assignments. The member will rejoin with
the existing subscriptions after the next application poll event.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareMembershipManager.java