group remove-members
kafka group remove-members <groupId>
Remove one or more static members from a consumer group’s session
Arguments
| Argument | Description |
|---|---|
groupId |
group id |
Shared options and defaults: connection profiles, JSON output, logging and help.
Defaults
Removes the specified member identities; consumer membership determines the resulting assignment.
Before you run
Evicts group members and triggers reassignment. Coordinate with the application to avoid unexpected rebalances and duplicate external side effects.
Flags
| Flag | Description |
|---|---|
--brokers <string> |
comma-separated broker list, e.g. localhost:9092 |
--yes |
confirm the removal without an interactive prompt |
--member <string> (repeatable) |
member to remove, memberId or memberId:groupInstanceId (repeatable; at least one required) |
Examples
kafka group remove-members my-group --member consumer-1-abc --brokers localhost:9092 --yes
Output
Illustrative, abbreviated output. Empty arrays show the result envelope; actual entries, identifiers, optional fields and broker errors depend on the request and cluster.
With --json:
{
"members": []
}
Declared exit codes: 0, 1, 2, 4, 5. See the exit-code reference for meanings.