ableegoldman commented on code in PR #19400: URL: https://github.com/apache/kafka/pull/19400#discussion_r2059386588
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java: ########## @@ -875,7 +878,7 @@ public void run() { streamsUncaughtExceptionHandler.accept(e, false); // Note: the above call currently rethrows the exception, so nothing below this line will be executed } finally { - completeShutdown(cleanRun); + completeShutdown(cleanRun, true); Review Comment: ah sorry i totally missed this question on my first pass 🤦♀️ No, we actually do want to stay in the group and retain the existing default behavior for Streams if you're curious why the default behavior for Streams is the opposite of the plain consumer client, it's because Streams is stateful which means rebalancing and moving partitions can be a much heavier operation and involve restoring many records from the changelog topics when partitions are shuffled around. By skipping the leave group, we can often avoid an unnecessary extra rebalance that would result in partitions being moved, since the assignment of Streams is heavily dependent on the current group members. If an error gets thrown and the StreamThread dies and gets restarted within the session timeout, we can avoid any rebalances where the dead thread is missing, so the rebalance when the new thread restarts should result in the same assignment of partitions to threads as we had before the thread died. -- 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