Enum Class CloseOptions.GroupMembershipOperation

java.lang.Object
java.lang.Enum<CloseOptions.GroupMembershipOperation>
org.apache.kafka.clients.consumer.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 leaving a group.
  • LEAVE_GROUP: The consumer will leave the group. This is the default for dynamic members, and can be used by static members when they want to permanently leave the group and trigger a rebalance.
  • REMAIN_IN_GROUP: The consumer will remain in the group. This is the default for static members, allowing them to rejoin quickly without triggering a rebalance. When used by dynamic members, no leave heartbeat will be sent and the member will be removed by the coordinator after the session timeout expires.
  • DEFAULT: Applies the default behavior:
    • For static members: The consumer will remain in the group.
    • For dynamic members: The consumer will leave the group.