Versions Compared

Key

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

...

Code Block
titleAdminClient.java
public static MembershipChangeResult enableStaticMembership(String groupId, int registrationTimeout, int expansionTimeout)
public static MembershipChangeResult enableDynamicMembership(String groupId)
public static MembershipChangeResult forceRebalanceforceStaticRebalance(String groupId)

enableStaticMembership will change the consumer group to static membership, along with changing registration timeout and expansion timeout. After that, all the joining members are required to set the member name field. Error will be returned if the broker is on an old version or other potential failure cases. Note that the client should already include member name field at this point. User could also use this API to change the timeout configs as they want, or leave it blank for the first time when they start to try the new membership protocol.

enableDynamicMembership will in the contrary just change the membership back to dynamic mode. Error will be returned if the broker is on an old version, group is already on dynamic membership or other potential failure cases.

forceRebalance forceStaticRebalance will trigger one rebalance immediately on static membership. Error will be returned if the broker is on an old version, or group is on dynamic membership or other potential failure cases. This is mainly used for fast scale up/down cases.

...