chia7712 commented on code in PR #16899: URL: https://github.com/apache/kafka/pull/16899#discussion_r1726447968
########## clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java: ########## @@ -727,6 +730,16 @@ private void checkGroupRemoteAssignor() { } } + private void checkPartitionAssigmentStrategy() { + List<String> assignmentStrategies = getList(PARTITION_ASSIGNMENT_STRATEGY_CONFIG); + if (getString(GROUP_PROTOCOL_CONFIG).equalsIgnoreCase(GroupProtocol.CONSUMER.name())) { + List<Class<? extends AbstractPartitionAssignor>> defaultValue = Arrays.asList(RangeAssignor.class, CooperativeStickyAssignor.class); Review Comment: Could you please create a default value of `Arrays.asList(RangeAssignor.class, CooperativeStickyAssignor.class)`? That can keep the consistency in the futrue ########## clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java: ########## @@ -727,6 +730,16 @@ private void checkGroupRemoteAssignor() { } } + private void checkPartitionAssigmentStrategy() { + List<String> assignmentStrategies = getList(PARTITION_ASSIGNMENT_STRATEGY_CONFIG); + if (getString(GROUP_PROTOCOL_CONFIG).equalsIgnoreCase(GroupProtocol.CONSUMER.name())) { + List<Class<? extends AbstractPartitionAssignor>> defaultValue = Arrays.asList(RangeAssignor.class, CooperativeStickyAssignor.class); + if (!new HashSet<>(assignmentStrategies).containsAll(defaultValue) || assignmentStrategies.size() != defaultValue.size()) { Review Comment: maybe we should accept the config equal to the default. for example, the config having `org.apache.kafka.clients.consumer.RangeAssignor` and `org.apache.kafka.clients.consumer.CooperativeStickyAssignor` should work -- 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