- NAME
-
- gcloud beta pubsub lite-subscriptions seek - seek a Pub/Sub Lite subscription
- SYNOPSIS
-
-
gcloud beta pubsub lite-subscriptions seek(SUBSCRIPTION:--location=LOCATION) (--event-time=EVENT_TIME|--publish-time=PUBLISH_TIME|--starting-offset=STARTING_OFFSET) [--async] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(BETA)Initiate an out-of-band seek operation for a Pub/Sub Lite subscription to a specified target, which may be timestamps or named locations within the message backlog.The seek operation will complete once subscriber clients react to the seek for all partitions of the topic. Note that the seek operation will not complete until subscribers are online. It may take some time (usually within 30 seconds) for the seek to propagate if subscribers are online. Use the --async flag if it's not necessary to wait for completion.
- EXAMPLES
-
To seek a Pub/Sub Lite subscription to the beginning of the message backlog,
run:
gcloud beta pubsub lite-subscriptions seek mysubscription --location=us-central1-a --starting-offset=beginningTo seek a Pub/Sub Lite subscription to a publish time without waiting for the operation to complete, run:
gcloud beta pubsub lite-subscriptions seek mysubscription --location=us-central1-a --publish-time="2021-01-01T12:00:00Z" --async - POSITIONAL ARGUMENTS
-
-
Subscription resource - Subscription to seek. The arguments in this group can be
used to specify the attributes of this resource. (NOTE) Some attributes are not
given arguments in this group but can be set in other ways.
To set the
projectattribute:-
provide the argument
subscriptionon the command line with a fully specified name; -
provide the argument
--projecton the command line; -
set the property
core/project.
This must be specified.
SUBSCRIPTION-
ID of the subscription or fully qualified identifier for the subscription.
To set the
subscriptionattribute:-
provide the argument
subscriptionon the command line.
This positional argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--location=LOCATION-
ID of the location of the Pub/Sub Lite resource.
To set the
locationattribute:-
provide the argument
subscriptionon the command line with a fully specified name; -
provide the argument
--locationon the command line.
-
provide the argument
-
provide the argument
-
Subscription resource - Subscription to seek. The arguments in this group can be
used to specify the attributes of this resource. (NOTE) Some attributes are not
given arguments in this group but can be set in other ways.
- REQUIRED FLAGS
-
-
Exactly one of these must be specified:
--event-time=EVENT_TIME- The event time to which you seek a subscription. The subscription seeks to the first message with event time greater than or equal to the specified event time. Messages missing an event time use publish time as a fallback. As event times are user supplied, subsequent messages may have event times less than the specified event time and must be filtered by the client, if necessary. Run $ gcloud topic datetimes for information on time formats.
--publish-time=PUBLISH_TIME- The publish time to which you seek a subscription. Messages with publish time greater than or equal to the specified time are delivered after the seek operation. Run $ gcloud topic datetimes for information on time formats.
--starting-offset=STARTING_OFFSET-
The offset at which a newly created or seeked subscription starts receiving
messages. A subscription can be initialized at the offset of the oldest retained
message (
beginning), or at the current HEAD offset (end).STARTING_OFFSETmust be one of:beginning,end.
-
Exactly one of these must be specified:
- OPTIONAL FLAGS
-
--async- Return immediately, without waiting for the operation in progress to complete.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - API REFERENCE
-
This command uses the
pubsublite/v1API. The full documentation for this API can be found at: https://cloud.google.com/pubsub/lite/docs - NOTES
-
This command is currently in beta and might change without notice. These
variants are also available:
gcloud pubsub lite-subscriptions seekgcloud alpha pubsub lite-subscriptions seek
gcloud beta pubsub lite-subscriptions seek
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.