Skip to main content
Version: 22.2

rpk group seek

Modify a group's current offsets.

This command allows you to modify a group's offsets. Sometimes, you may need to rewind a group if you had a mistaken deploy, or fast-forward a group if it is falling behind on messages that can be skipped.

The --to option allows you to seek to the start of partitions, end of partitions, or after a specific timestamp. The default is to seek any topic previously committed. Using --topics allows to you set commits for only the specified topics; all other commits will remain untouched. Topics with no commits will not be committed unless allowed with --allow-new-topics.

The --to-group option allows you to seek to commits that are in another group. This is a merging operation: if g1 is consuming topics A and B, and g2 is consuming only topic B, rpk group seek g1 --to-group g2 will update g1's commits for topic B only. The --topics flag can be used to further narrow which topics are updated. Unlike --to, all non-filtered topics are committed, even topics not yet being consumed, meaning --allow-new-topics is not needed.

The --to-file option allows to seek to offsets specified in a text file with the following format:

[TOPIC] [PARTITION] [OFFSET]
[TOPIC] [PARTITION] [OFFSET]

Each line contains the topic, the partition, and the offset to seek to. As with the prior options, --topics allows filtering which topics are updated. Similar to --to-group, all non-filtered topics are committed, even topics not yet being consumed, meaning --allow-new-topics is not needed.

The --to, --to-group, and --to-file options are mutually exclusive. If you are not authorized to describe or read some topics used in a group, you will not be able to modify offsets for those topics.

Examples

Seek group G to June 1st, 2021:

rpk group seek g --to 1622505600

or

rpk group seek g --to 1622505600000

or

rpk group seek g --to 1622505600000000000

Seek group X to the commits of group Y topic foo:

rpk group seek X --to-group Y --topics foo

Seek group G's topics foo, bar, and biz to the end:

rpk group seek G --to end --topics foo,bar,biz

Seek group G to the beginning of a topic it was not previously consuming:

rpk group seek G --to start --topics foo --allow-new-topics

Usage

rpk group seek [GROUP] --to (start|end|timestamp) --to-group ... --topics ... [flags]

Flags

Value Type Description
--allow-new-topics-Allow seeking to new topics not currently consumed (implied with --to-group or --to-file).
-h, --help- Help for seek.
--tostringWhere to seek (start, end, unix second | millisecond | nanosecond).
--to-filestring Seek to offsets as specified in the file.
--to-groupstring Seek to the commits of another group.
--topicsstrings Only seek these topics, if any are specified.
--brokersstringsComma-separated list of broker <ip>:<port> pairs (for example,--brokers '192.168.78.34:9092,192.168.78.35:9092,192.179.23.54:9092'). Alternatively, you may set the REDPANDA_BROKERSenvironment variable with the comma-separated list of broker addresses.
--configstringRedpanda config file, if not set the file will be searched for in the default locations.
--passwordstring SASL password to be used for authentication.
--sasl-mechanismstringThe authentication mechanism to use. Supported values:SCRAM-SHA-256, SCRAM-SHA-512.
--tls-certstringThe certificate to be used for TLS authentication with the broker.
--tls-enabled-Enable TLS for the Kafka API (not necessary if specifying custom certs).
--tls-keystringThe certificate key to be used for TLS authentication with the broker.
--tls-truststorestring The truststore to be used for TLS communication with the broker.
--userstring SASL user to be used for authentication.
-v, --verbose-Enable verbose logging (default false).

What do you like about this doc?




Optional: Share your email address if we can contact you about your feedback.

Let us know what we do well: