ableegoldman commented on code in PR #19400: URL: https://github.com/apache/kafka/pull/19400#discussion_r2071526999
########## streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java: ########## @@ -1181,7 +1180,6 @@ private Optional<String> removeStreamThread(final long timeoutMs) throws Timeout final boolean callingThreadIsNotCurrentStreamThread = !streamThread.getName().equals(Thread.currentThread().getName()); if (streamThread.isThreadAlive() && (callingThreadIsNotCurrentStreamThread || numLiveStreamThreads() == 1)) { log.info("Removing StreamThread {}", streamThread.getName()); - final Optional<String> groupInstanceID = streamThread.groupInstanceID(); streamThread.requestLeaveGroupDuringShutdown(); streamThread.shutdown(); Review Comment: I think we can just call the `streamThread.shutdown(boolean leaveGroup)` method here (with leaveGroup = true). Then we won't need the `streamThread.closeConsumer()` down below -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org