Method: topicStats.projects.locations.topics.computeHeadCursor

Compute the head cursor for the partition. The head cursor's offset is guaranteed to be less than or equal to all messages which have not yet been acknowledged as published, and greater than the offset of any message whose publish has already been acknowledged. It is zero if there have never been messages in the partition.

HTTP request

POST https://{endpoint}/v1/topicStats/{topic=projects/*/locations/*/topics/*}:computeHeadCursor

Where {endpoint} is one of the supported service endpoints.

The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
topic

string

Required. The topic for which we should compute the head cursor.

Authorization requires the following IAM permission on the specified resource topic:

  • pubsublite.topics.computeHeadCursor

Request body

The request body contains data with the following structure:

JSON representation
{
  "partition": string
}
Fields
partition

string (int64 format)

Required. The partition for which we should compute the head cursor.

Response body

If successful, the response body contains data with the following structure:

Response containing the head cursor for the requested topic and partition.

JSON representation
{
  "headCursor": {
    object (Cursor)
  }
}
Fields
headCursor

object (Cursor)

The head cursor.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.