squah-confluent commented on code in PR #18224:
URL: https://github.com/apache/kafka/pull/18224#discussion_r1916134130
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/consumer/ConsumerGroup.java:
##########
@@ -1255,12 +1255,27 @@ public boolean supportsClassicProtocols(String
memberProtocolType, Set<String> m
/**
* Checks whether all the members use the classic protocol except the
given member.
*
- * @param memberId The member to remove.
+ * @param member The member to remove.
* @return A boolean indicating whether all the members use the classic
protocol.
*/
- public boolean allMembersUseClassicProtocolExcept(String memberId) {
- return numClassicProtocolMembers() == members().size() - 1 &&
- !getOrMaybeCreateMember(memberId, false).useClassicProtocol();
+ public boolean allMembersUseClassicProtocolExcept(ConsumerGroupMember
member) {
+ return numClassicProtocolMembers() == members().size() - 1 &&
!member.useClassicProtocol();
+ }
+
+ /**
+ * Checks whether all the members use the classic protocol except the
given members.
+ *
+ * @param members The members to remove.
+ * @return A boolean indicating whether all the members use the classic
protocol.
+ */
+ public boolean allMembersUseClassicProtocolExcept(Set<ConsumerGroupMember>
members) {
Review Comment:
Good idea, added a test for it.
--
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]