public void setStandbyUpdateListener(final StandbyUpdateListener standbyListener) {
        synchronized (stateLock) {
            if (state.hasNotStarted()) {
                this.delegatingStandbyUpdateListener.setUserStandbyListener(standbyListener);
            } else {
                throw new IllegalStateException("Can only set StandbyUpdateListener before calling start(). " +
                        "Current state is: " + state);
            }
        }
    }
Set the listener which is triggered whenever a standby task is updated

@param standbyListener The listener triggered when a standby task is updated.
@throws IllegalStateException if this {@code KafkaStreams} instance has already been started.
streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java