lianetm commented on code in PR #14390: URL: https://github.com/apache/kafka/pull/14390#discussion_r1358337681
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java: ########## @@ -142,9 +142,26 @@ public void transitionToFailed() { transitionTo(MemberState.FAILED); } + @Override + public void tryJoin() { + resetEpoch(); + transitionTo(MemberState.UNJOINED); + } + + @Override + public void leaveGroup() { + resetEpoch(); Review Comment: I don't get the full idea here. What's the intended usage for this? If the intention is to use the transition as a trigger to send the last HB, then `resetEpoch` is incorrect, because we need epoch -1 (or -2 if static member). If the intention is just to call this after the last HB has been sent, then how are you seeing we'll trigger that last HB? (ex. from the unsubsbcribe) -- 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