lianetm commented on code in PR #16899:
URL: https://github.com/apache/kafka/pull/16899#discussion_r1743565460


##########
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java:
##########
@@ -727,6 +731,20 @@ private void checkGroupRemoteAssignor() {
         }
     }
 
+    @SuppressWarnings("unchecked")
+    private void checkPartitionAssigmentStrategy() {
+        List<Object> assignmentStrategies = (List<Object>) 
get(PARTITION_ASSIGNMENT_STRATEGY_CONFIG);
+        if 
(getString(GROUP_PROTOCOL_CONFIG).equalsIgnoreCase(GroupProtocol.CONSUMER.name()))
 {

Review Comment:
   I wonder if it would help readability to encapsulate this in something along 
the lines of: 
   ```suggestion
           if (isConsumerProtocol()) {
   ```
   And then a similar `isClassicProtocol()`. The trick is that we already have 
protocol checks in 2 places (this and `checkGroupRemoteAssignor`), and I expect 
we will need it again as we keep adding other consistency validations.



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