ableegoldman commented on a change in pull request #10387: URL: https://github.com/apache/kafka/pull/10387#discussion_r600059442
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java ########## @@ -631,6 +625,14 @@ public void setStreamsUncaughtExceptionHandler(final java.util.function.Consumer this.streamsUncaughtExceptionHandler = streamsUncaughtExceptionHandler; } + 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(); Review comment: But do we even need to invoke `maybeSendShutdown` at all from the two catch blocks? The thread that we start up should handle this -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org