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


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerMembershipManager.java:
##########
@@ -469,8 +493,17 @@ public int joinGroupEpoch() {
      */
     @Override
     public int leaveGroupEpoch() {
-        return groupInstanceId.isPresent() ?
-                ConsumerGroupHeartbeatRequest.LEAVE_GROUP_STATIC_MEMBER_EPOCH :
-                ConsumerGroupHeartbeatRequest.LEAVE_GROUP_MEMBER_EPOCH;
+        boolean isStaticMember = groupInstanceId.isPresent();
+        if (REMAIN_IN_GROUP == leaveGroupOperation && isStaticMember) {

Review Comment:
   Yes, I should clean this method up after 
https://github.com/apache/kafka/pull/17614#discussion_r1986090241
   Now, the matrix of membership and epoch is :
   |         | REMAIN     | LEAVE | DEFAULT |
   | ------- | ---------- | ----- | ------- |
   | dynamic | Don't send | -1    | -1      |
   | static  | -2         | -1    | -2      |
   
   Given that, we could remove  `if (REMAIN_IN_GROUP == leaveGroupOperation && 
isStaticMember)`  condition.



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