OS Manuals

/usr/lib/kafka/bin/kafka-consumer-groups.sh

Community edition of Confluent Kafka.

From confluent-kafka 8.4.0.215-r1 (os), captured 2026-11-05 by running kafka-consumer-groups.sh --help (exit 1). permalink

This tool helps to list all consumer groups, describe a consumer group, delete consumer group info, or reset consumer group offsets.
Option                                  Description
------                                  -----------
--all-groups                            Apply to all consumer groups.
--all-topics                            Consider all topics assigned to a
                                          group in the `reset-offsets` process.
--bootstrap-server <String: server to   The server(s) to connect to. REQUIRED
  connect to>                             for all options except for --
                                          validate-regex.
--by-duration <String: duration>        Reset offsets to offset by duration
                                          from current timestamp. Format:
                                          'PnDTnHnMnS'
--command-config <String: command       Property file containing configs to be
  config property file>                   passed to Admin Client and Consumer.
--delete                                Pass in groups to delete topic
                                          partition offsets and ownership
                                          information over the entire consumer
                                          group. For instance --group g1 --
                                          group g2
--delete-offsets                        Delete offsets of consumer group.
                                          Supports one consumer group at the
                                          time, and multiple topics.
--describe                              Describe consumer group and list
                                          offset lag (number of messages not
                                          yet processed) related to given
                                          group.
--dry-run                               Only show results without executing
                                          changes on Consumer Groups.
                                          Supported operations: reset-offsets.
--execute                               Execute operation. Supported
                                          operations: reset-offsets.
--export                                Export operation execution to a CSV
                                          file. Supported operations: reset-
                                          offsets.
--from-file <String: path to CSV file>  Reset offsets to values defined in CSV
                                          file.
--group <String: consumer group>        The consumer group we wish to act on.
--help                                  Print usage information.
--list                                  List all consumer groups.
--members                               Describe members of the group. This
                                          option may be used with '--describe'
                                          and '--bootstrap-server' options
                                          only.
                                        Example: --bootstrap-server localhost:
                                          9092 --describe --group group1 --
                                          members
--offsets                               Describe the group and list all topic
                                          partitions in the group along with
                                          their offset lag. This is the
                                          default sub-action of and may be
                                          used with '--describe' and '--
                                          bootstrap-server' options only.
                                        Example: --bootstrap-server localhost:
                                          9092 --describe --group group1 --
                                          offsets
--reset-offsets                         Reset offsets of consumer group.
                                          Supports one consumer group at the
                                          time, and instances should be
                                          inactive
                                        Has 2 execution options: --dry-run
                                          (the default) to plan which offsets
                                          to reset, and --execute to update
                                          the offsets. Additionally, the --
                                          export option is used to export the
                                          results to a CSV format.
                                        You must choose one of the following
                                          reset specifications: --to-datetime,
                                          --by-duration, --to-earliest, --to-
                                          latest, --shift-by, --from-file, --
                                          to-current, --to-offset.
                                        To define the scope use --all-topics
                                          or --topic. One scope must be
                                          specified unless you use '--from-
                                          file'.
--shift-by <Long: number-of-offsets>    Reset offsets shifting current offset
                                          by 'n', where 'n' can be positive or
                                          negative.
--state [String]                        When specified with '--describe',
                                          includes the state of the group.
                                        Example: --bootstrap-server localhost:
                                          9092 --describe --group group1 --
                                          state
                                        When specified with '--list', it
                                          displays the state of all groups. It
                                          can also be used to list groups with
                                          specific states.
                                        Example: --bootstrap-server localhost:
                                          9092 --list --state stable,empty
                                        This option may be used with '--
                                          describe', '--list' and '--bootstrap-
                                          server' options only.
--timeout <Long: timeout (ms)>          The timeout that can be set for some
                                          use cases. For example, it can be
                                          used when describing the group to
                                          specify the maximum amount of time
                                          in milliseconds to wait before the
                                          group stabilizes (when the group is
                                          just created, or is going through
                                          some changes). (default: 30000)
--to-current                            Reset offsets to current offset.
--to-datetime <String: datetime>        Reset offsets to offset from datetime.
                                          Format: 'YYYY-MM-DDThh:mm:ss.sss'
--to-earliest                           Reset offsets to earliest offset.
--to-latest                             Reset offsets to latest offset.
--to-offset <Long: offset>              Reset offsets to a specific offset.
--topic <String: topic>                 The topic whose consumer group
                                          information should be deleted or
                                          topic whose should be included in
                                          the reset offset process. In `reset-
                                          offsets` case, partitions can be
                                          specified using this format: `topic1:
                                          0,1,2`, where 0,1,2 are the
                                          partition to be included in the
                                          process. Reset-offsets also supports
                                          multiple topic inputs.
--type [String]                         When specified with '--list', it
                                          displays the types of all the
                                          groups. It can also be used to list
                                          groups with specific types.
                                        Example: --bootstrap-server localhost:
                                          9092 --list --type classic,consumer
                                        This option may be used with the '--
                                          list' option only.
--validate-regex <String: regex>        Validate that the syntax of the
                                          provided regular expression is valid
                                          according to the RE2 format.
--verbose                               Provide additional information, if
                                          any, when describing the group. This
                                          option may be used with '--
                                          offsets'/'--members'/'--state' and
                                          '--bootstrap-server' options only.
                                        Example: --bootstrap-server localhost:
                                          9092 --describe --group group1 --
                                          members --verbose
--version                               Display Kafka version.
Options (31)
OptionDescriptionSource
--all-groupsApply to all consumer groups.help
--all-topicsConsider all topics assigned to a group in the `reset-offsets` process.help
--bootstrap-server String:The server(s) to connect to.help
--by-duration String:Reset offsets to offset by duration from current timestamp.help
--command-config String:Property file containing configs to be config property file> passed to Admin Client and Consumer.help
--deletePass in groups to delete topic partition offsets and ownership information over the entire consumer group.help
--delete-offsetsDelete offsets of consumer group.help
--describeDescribe consumer group and list offset lag (number of messages not yet processed) related to given group.help
--dry-runOnly show results without executing changes on Consumer Groups.help
--executeExecute operation.help
--exportExport operation execution to a CSV file.help
--from-file String:Reset offsets to values defined in CSV file.help
--group String:The consumer group we wish to act on.help
--helpPrint usage information.help
--listList all consumer groups.help
--membersDescribe members of the group.help
--offsetsDescribe the group and list all topic partitions in the group along with their offset lag.help
--reset-offsetsReset offsets of consumer group.help
--shift-by Long:Reset offsets shifting current offset by 'n', where 'n' can be positive or negative.help
--state StringWhen specified with '--describe', includes the state of the group.help
--timeout Long:The timeout that can be set for some use cases.help
--to-currentReset offsets to current offset.help
--to-datetime String:Reset offsets to offset from datetime.help
--to-earliestReset offsets to earliest offset.help
--to-latestReset offsets to latest offset.help
--to-offset Long:Reset offsets to a specific offset.help
--topic String:The topic whose consumer group information should be deleted or topic whose should be included in the reset offset process.help
--type StringWhen specified with '--list', it displays the types of all the groups.help
--validate-regex String:Validate that the syntax of the provided regular expression is valid according to the RE2 format.help
--verboseProvide additional information, if any, when describing the group.help
--versionDisplay Kafka version.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.