public long timeToNextHeartbeatMs(final long currentTimeMs) {
            if (heartbeatTimer.isExpired()) {
                return this.remainingBackoffMs(currentTimeMs);
            }
            return heartbeatTimer.remainingMs();
        }
Check if a heartbeat request should be sent on the current time. A heartbeat should be
sent if the heartbeat timer has expired, backoff has expired, and there is no request
in-flight.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManager.java