squah-confluent commented on code in PR #21627:
URL: https://github.com/apache/kafka/pull/21627#discussion_r2891763760


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -8650,6 +8650,29 @@ private int consumerGroupHeartbeatIntervalMs(String 
groupId) {
             .orElse(config.consumerGroupHeartbeatIntervalMs());
     }
 
+    /**
+     * Get the interval between assignment updates of the provided consumer 
group.
+     */
+    // package private for testing
+    int consumerGroupAssignmentIntervalMs(String groupId) {
+        Optional<GroupConfig> groupConfig = 
groupConfigManager.groupConfig(groupId);
+        int assignmentIntervalMs = 
groupConfig.map(GroupConfig::consumerAssignmentIntervalMs)
+            .orElse(-1);
+        return assignmentIntervalMs >= 0 ?
+            assignmentIntervalMs :
+            config.consumerGroupAssignmentIntervalMs();
+    }

Review Comment:
   Thanks for the suggestion! It makes the `GroupMetadataManager` methods nicer.



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