bbejeck commented on code in PR #19400:
URL: https://github.com/apache/kafka/pull/19400#discussion_r2400156975


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java:
##########
@@ -1874,10 +1878,15 @@ private long advanceNowAndComputeLatency() {
      * <p>
      * Note that there is nothing to prevent this function from being called 
multiple times
      * (e.g., in testing), hence the state is set only the first time
+     *
+     * @param leaveGroup this flag will control whether the consumer will 
leave the group on close or not
      */
-    public void shutdown() {
+    public void shutdown(final boolean leaveGroup) {
         log.info("Informed to shut down");
         final State oldState = setState(State.PENDING_SHUTDOWN);
+        if (leaveGroup) {

Review Comment:
   couldn't this be simplified to `leaveGroupRequested.set(leaveGroup)`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to