Enum Class CloseOptions.GroupMembershipOperation

java.lang.Object
java.lang.Enum<CloseOptions.GroupMembershipOperation>
org.apache.kafka.streams.CloseOptions.GroupMembershipOperation
All Implemented Interfaces:
Serializable, Comparable<CloseOptions.GroupMembershipOperation>, Constable
Enclosing class:
CloseOptions

public static enum CloseOptions.GroupMembershipOperation extends Enum<CloseOptions.GroupMembershipOperation>
Enum to specify the group membership operation upon closing the Kafka Streams application.
  • DEFAULT: Applies the default behavior based on the active protocol and membership type:
    • For the classic protocol: The consumer will remain in the group.
    • For the streams protocol (group.protocol=streams):
      • Dynamic members: The consumer will leave the group (consistent with the protocol's design for dynamic members).
      • Static members: The consumer will remain in the group until session timeout (consistent with static membership semantics).
  • LEAVE_GROUP: The consumer will explicitly leave the group, regardless of the active protocol.
  • REMAIN_IN_GROUP: The consumer will remain in the group, regardless of the active protocol. Under the streams protocol, this enables a faster rebalance upon restart for static members.