frankvicky commented on code in PR #17614:
URL: https://github.com/apache/kafka/pull/17614#discussion_r1972974121


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerMembershipManager.java:
##########
@@ -469,8 +498,14 @@ public int joinGroupEpoch() {
      */
     @Override
     public int leaveGroupEpoch() {
+        if 
(CloseOptions.GroupMembershipOperation.LEAVE_GROUP.equals(leaveGroupOperation)) 
{
+            return ConsumerGroupHeartbeatRequest.LEAVE_GROUP_MEMBER_EPOCH;
+        } else if 
(CloseOptions.GroupMembershipOperation.REMAIN_IN_GROUP.equals(leaveGroupOperation))
 {
+            return 
ConsumerGroupHeartbeatRequest.LEAVE_GROUP_STATIC_MEMBER_EPOCH;
+        }

Review Comment:
   As https://github.com/apache/kafka/pull/17614#discussion_r1972859960 
mentioned, consumerGroupHeartbeat always sends, so we need to select the 
"right" epoch.



-- 
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

Reply via email to