Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Public Interfaces

Client side changes:

Code Block
titleorg.apache.kafka.clients.admin.MemberToRemove
public class MemberToRemove {

	// deprecated methods

    @Deprecated
	private String memberId; 

	// newly added methods

    public MemberToRemove() {}

    public MemberToRemove withGroupInstanceId(String groupInstanceId) {}

    public MemberToRemove withMemberId(String memberId) {}
}

kafkaAdminClient related changes:

Code Block
titleRemoveMembersFromConsumerGroupOptions
public class RemoveMembersFromConsumerGroupOptions {
	// newly added field
	private boolean removeAll;

	// newly added constructor
	public RemoveMembersFromConsumerGroupOptions(Collection<MemberToRemove> members, Boolean removeAll) {}
}

...

KIP-571 plan to support the ability to force remove members in StreamsResetter, this involves public interfaces changes as below:

1) Changes in org.apache.kafka.clients.admin.MemberToRemove 

Previously the KafkaAdminClient#removeMembersFromConsumerGroup only supports to remove members by specifying the groupInstanceId, which means it only supports the removal of static members, so the memberId is added to support removing dynamic members. Since there are two String fields now, new helpers are added and the old constructor will be deprecated.

2) Changes related to kafkaAdminclient

By adding new field removeAll in RemoveMembersFromConsumerGroupOptions, KafkaAdminClient#removeMembersFromConsumerGroup will support remove all members in the specified group. The implementation of removeMembersFromConsumerGroup should, when removeAll specified, first query the members of the given group and then issue a LeaveGroupRequest with all members specified. Accordingly, the RemoveMembersFromConsumerGroupResult also adds a new field removeAll to handle differently for RemoveMembersFromConsumerGroupResult#all, under the removeAll scenario, RemoveMembersFromConsumerGroupResult#memberInfos should be empty, the all() should directly check if RemoveMembersFromConsumerGroupResult#future 100% succeed.

32) Add cmdline option --force to StreamsResetter

...

  1. Because no classes/method will be removed but only deprecated, change 1)&2) will be backward compatible
  2. The new cmdline option --force is also backward compatible because it's a new feature, if not specified, the StreamsResetter's behavior remains unchanged.

...