public void maybeSendShutdown() {
        if (assignmentErrorCode.get() == AssignorError.SHUTDOWN_REQUESTED.code()) {
            log.warn("Detected that shutdown was requested. " +
                    "All clients in this app will now begin to shutdown");
            mainConsumer.enforceRebalance("Shutdown requested");
        }
    }
Sets the streams uncaught exception handler.

@param streamsUncaughtExceptionHandler the user handler wrapped in shell to execute the action
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java