Versions Compared

Key

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

...

Sometimes people want to reset the stream application sooner , but blocked by the left-over members inside the group coordinator, which only expire expires after session timeout. When user configures a really long session timeout, it could prevent the group from clearing. We should consider adding the support to cleanup clean up members by forcing them to leave the group. To do that, 

...

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

...

Previously the org.apache.kafka.clients.admin.KafkaAdminClient#removeMembersFromConsumerGroup only support supports to remove members by specifying the groupInstanceId, which means it only support 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.

...

While with the new option, the StreamsResetter will force remove all active members fetched by KafkaAdminClient#describeConsumerGroups, and all the members' info will be logged out if all removals succeed. Otherwise,  the first member removal error will be thrown. Further moreFurthermore, users should make sure all the stream applications should be are shutdown when run running StreamsResetter with --force, otherwise it might trigger unexpected rebalance. 

The detailed member removal error cases could be found in KIP-345, which introduced static membership and batch removal on the broker side.

Server Broker side logic has no change, GroupCoordinator#handleLeaveGroup can handle both dynamic and static member removals since 2.4.

...

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

Requirement The requirement to use this feature:


Release version requirementExpected error if requirement not satisfied
broker side >= 2.4

UnsupportedVersionException will be thrown because batch removal feature was introduced since version 2.4

client sideupdate to this KIP

"force is not a recognized option" will be in the client side log

...