gcloud alpha pubsub lite-subscriptions seek

NAME
gcloud alpha pubsub lite-subscriptions seek - seek a Pub/Sub Lite subscription
SYNOPSIS
gcloud alpha pubsub lite-subscriptions seek(SUBSCRIPTION :--location=LOCATION)(--event-time=EVENT_TIME    |--publish-time=PUBLISH_TIME    |--starting-offset=STARTING_OFFSET)[--async][GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA) Initiate an out-of-band seek operation for a Pub/Sub Litesubscription to a specified target, which may be timestamps or named locationswithin the message backlog.

The seek operation will complete once subscriber clients react to the seek forall partitions of the topic. Note that the seek operation will not completeuntil 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 ifit's not necessary to wait for completion.

EXAMPLES
To seek a Pub/Sub Lite subscription to the beginning of the message backlog,run:
gcloudalphapubsublite-subscriptionsseekmysubscription--location=us-central1-a--starting-offset=beginning

To seek a Pub/Sub Lite subscription to a publish time without waiting for theoperation to complete, run:

gcloudalphapubsublite-subscriptionsseekmysubscription--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 beused to specify the attributes of this resource. (NOTE) Some attributes are notgiven arguments in this group but can be set in other ways.

To set theproject attribute:

  • provide the argumentsubscription on the command line with a fullyspecified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

This must be specified.

SUBSCRIPTION
ID of the subscription or fully qualified identifier for the subscription.

To set thesubscription attribute:

  • provide the argumentsubscription on the command line.

This positional argument must be specified if any of the other arguments in thisgroup are specified.

--location=LOCATION
ID of the location of the Pub/Sub Lite resource.To set thelocation attribute:
  • provide the argumentsubscription on the command line with a fullyspecified name;
  • provide the argument--location on the command line.
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 thefirst 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 timesare user supplied, subsequent messages may have event times less than thespecified event time and must be filtered by the client, if necessary. Run $gcloud topic datetimes forinformation on time formats.
--publish-time=PUBLISH_TIME
The publish time to which you seek a subscription. Messages with publish timegreater than or equal to the specified time are delivered after the seekoperation. Run $gcloud topicdatetimes for information on time formats.
--starting-offset=STARTING_OFFSET
The offset at which a newly created or seeked subscription starts receivingmessages. A subscription can be initialized at the offset of the oldest retainedmessage (beginning), or at the current HEAD offset(end).STARTING_OFFSET must be one of:beginning,end.
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 help for details.

API REFERENCE
This command uses thepubsublite/v1 API. The full documentation forthis API can be found at:https://cloud.google.com/pubsub/lite/docs
NOTES
This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudpubsublite-subscriptionsseek
gcloudbetapubsublite-subscriptionsseek

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-07 UTC.