Index
AdminService
(interface)CursorService
(interface)PartitionAssignmentService
(interface)PublisherService
(interface)SubscriberService
(interface)TopicStatsService
(interface)AttributeValues
(message)CommitCursorRequest
(message)CommitCursorResponse
(message)ComputeMessageStatsRequest
(message)ComputeMessageStatsResponse
(message)CreateSubscriptionRequest
(message)CreateTopicRequest
(message)Cursor
(message)DeleteSubscriptionRequest
(message)DeleteTopicRequest
(message)FlowControlRequest
(message)GetSubscriptionRequest
(message)GetTopicPartitionsRequest
(message)GetTopicRequest
(message)InitialCommitCursorRequest
(message)InitialCommitCursorResponse
(message)InitialPartitionAssignmentRequest
(message)InitialPublishRequest
(message)InitialPublishResponse
(message)InitialSubscribeRequest
(message)InitialSubscribeResponse
(message)ListPartitionCursorsRequest
(message)ListPartitionCursorsResponse
(message)ListSubscriptionsRequest
(message)ListSubscriptionsResponse
(message)ListTopicSubscriptionsRequest
(message)ListTopicSubscriptionsResponse
(message)ListTopicsRequest
(message)ListTopicsResponse
(message)MessagePublishRequest
(message)MessagePublishResponse
(message)MessageResponse
(message)PartitionAssignment
(message)PartitionAssignmentAck
(message)PartitionAssignmentRequest
(message)PartitionCursor
(message)PubSubMessage
(message)PublishRequest
(message)PublishResponse
(message)SeekRequest
(message)SeekRequest.NamedTarget
(enum)SeekResponse
(message)SequencedCommitCursorRequest
(message)SequencedCommitCursorResponse
(message)SequencedMessage
(message)StreamingCommitCursorRequest
(message)StreamingCommitCursorResponse
(message)SubscribeRequest
(message)SubscribeResponse
(message)Subscription
(message)Subscription.DeliveryConfig
(message)Subscription.DeliveryConfig.DeliveryRequirement
(enum)Topic
(message)Topic.PartitionConfig
(message)Topic.PartitionConfig.Capacity
(message)Topic.RetentionConfig
(message)TopicPartitions
(message)UpdateSubscriptionRequest
(message)UpdateTopicRequest
(message)
AdminService
The service that a client application uses to manage topics and subscriptions, such creating, listing, and deleting topics and subscriptions.
CreateSubscription | |
---|---|
Creates a new subscription.
|
CreateTopic | |
---|---|
Creates a new topic.
|
DeleteSubscription | |
---|---|
Deletes the specified subscription.
|
DeleteTopic | |
---|---|
Deletes the specified topic.
|
GetSubscription | |
---|---|
Returns the subscription configuration.
|
GetTopic | |
---|---|
Returns the topic configuration.
|
GetTopicPartitions | |
---|---|
Returns the partition information for the requested topic.
|
ListSubscriptions | |
---|---|
Returns the list of subscriptions for the given project.
|
ListTopicSubscriptions | |
---|---|
Lists the subscriptions attached to the specified topic.
|
ListTopics | |
---|---|
Returns the list of topics for the given project.
|
UpdateSubscription | |
---|---|
Updates properties of the specified subscription.
|
UpdateTopic | |
---|---|
Updates properties of the specified topic.
|
CursorService
The service that a subscriber client application uses to manage committed cursors while receiving messsages. A cursor represents a subscriber's progress within a topic partition for a given subscription.
CommitCursor | |
---|---|
Updates the committed cursor.
|
ListPartitionCursors | |
---|---|
Returns all committed cursor information for a subscription.
|
StreamingCommitCursor | |
---|---|
Establishes a stream with the server for managing committed cursors.
|
PartitionAssignmentService
The service that a subscriber client application uses to determine which partitions it should connect to.
AssignPartitions | |
---|---|
Assign partitions for this client to handle for the specified subscription. The client must send an InitialPartitionAssignmentRequest first. The server will then send at most one unacknowledged PartitionAssignment outstanding on the stream at a time. The client should send a PartitionAssignmentAck after updating the partitions it is connected to to reflect the new assignment.
|
PublisherService
The service that a publisher client application uses to publish messages to topics. Published messages are retained by the service for the duration of the retention period configured for the respective topic, and are delivered to subscriber clients upon request (via the SubscriberService
).
Publish | |
---|---|
Establishes a stream with the server for publishing messages. Once the stream is initialized, the client publishes messages by sending publish requests on the stream. The server responds with a PublishResponse for each PublishRequest sent by the client, in the same order that the requests were sent. Note that multiple PublishRequests can be in flight simultaneously, but they will be processed by the server in the order that they are sent by the client on a given stream.
|
SubscriberService
The service that a subscriber client application uses to receive messages from subscriptions.
Subscribe | |
---|---|
Establishes a stream with the server for receiving messages.
|
TopicStatsService
This service allows users to get stats about messages in their topic.
ComputeMessageStats | |
---|---|
Compute statistics about a range of messages in a given topic and partition.
|
AttributeValues
The values associated with a key of an attribute.
Fields | |
---|---|
values[] |
The list of values associated with a key. |
CommitCursorRequest
Request for CommitCursor.
Fields | |
---|---|
subscription |
The subscription for which to update the cursor. Authorization requires the following IAM permission on the specified resource
|
partition |
The partition for which to update the cursor. Partitions are zero indexed, so |
cursor |
The new value for the committed cursor. |
CommitCursorResponse
Response for CommitCursor.
ComputeMessageStatsRequest
Compute statistics about a range of messages in a given topic and partition.
Fields | |
---|---|
topic |
Required. The topic for which we should compute message stats. Authorization requires the following IAM permission on the specified resource
|
partition |
Required. The partition for which we should compute message stats. |
start_cursor |
The inclusive start of the range. |
end_cursor |
The exclusive end of the range. The range is empty if end_cursor <= start_cursor. Specifying a start_cursor before the first message and an end_cursor after the last message will retrieve all messages. |
ComputeMessageStatsResponse
Response containing stats for messages in the requested topic and partition.
Fields | |
---|---|
message_count |
The count of messages. |
message_bytes |
The number of quota bytes accounted to these messages. |
minimum_publish_time |
The minimum publish timestamp across these messages. Note that publish timestamps within a partition are not guaranteed to be non-decreasing. The timestamp will be unset if there are no messages. |
minimum_event_time |
The minimum event timestamp across these messages. For the purposes of this computation, if a message does not have an event time, we use the publish time. The timestamp will be unset if there are no messages. |
CreateSubscriptionRequest
Request for CreateSubscription.
Fields | |
---|---|
parent |
Required. The parent location in which to create the subscription. Structured like Authorization requires the following IAM permission on the specified resource
|
subscription |
Required. Configuration of the subscription to create. Its Authorization requires the following IAM permission on the specified resource
|
subscription_id |
Required. The ID to use for the subscription, which will become the final component of the subscription's name. This value is structured like: |
CreateTopicRequest
Request for CreateTopic.
Fields | |
---|---|
parent |
Required. The parent location in which to create the topic. Structured like Authorization requires the following IAM permission on the specified resource
|
topic |
Required. Configuration of the topic to create. Its |
topic_id |
Required. The ID to use for the topic, which will become the final component of the topic's name. This value is structured like: |
Cursor
A cursor that describes the position of a message within a topic partition.
Fields | |
---|---|
offset |
The offset of a message within a topic partition. Must be greater than or equal 0. |
DeleteSubscriptionRequest
Request for DeleteSubscription.
Fields | |
---|---|
name |
Required. The name of the subscription to delete. Authorization requires the following IAM permission on the specified resource
|
DeleteTopicRequest
Request for DeleteTopic.
Fields | |
---|---|
name |
Required. The name of the topic to delete. Authorization requires the following IAM permission on the specified resource
|
FlowControlRequest
Request to grant tokens to the server, requesting delivery of messages when they become available.
Fields | |
---|---|
allowed_messages |
The number of message tokens to grant. Must be greater than or equal to 0. |
allowed_bytes |
The number of byte tokens to grant. Must be greater than or equal to 0. |
GetSubscriptionRequest
Request for GetSubscription.
Fields | |
---|---|
name |
Required. The name of the subscription whose configuration to return. Authorization requires the following IAM permission on the specified resource
|
GetTopicPartitionsRequest
Request for GetTopicPartitions.
Fields | |
---|---|
name |
Required. The topic whose partition information to return. Authorization requires the following IAM permission on the specified resource
|
GetTopicRequest
Request for GetTopic.
Fields | |
---|---|
name |
Required. The name of the topic whose configuration to return. Authorization requires the following IAM permission on the specified resource
|
InitialCommitCursorRequest
The first streaming request that must be sent on a newly-opened stream. The client must wait for the response before sending subsequent requests on the stream.
Fields | |
---|---|
subscription |
The subscription for which to manage committed cursors. Authorization requires the following IAM permission on the specified resource
|
partition |
The partition for which to manage committed cursors. Partitions are zero indexed, so |
InitialCommitCursorResponse
Response to an InitialCommitCursorRequest.
InitialPartitionAssignmentRequest
The first request that must be sent on a newly-opened stream. The client must wait for the response before sending subsequent requests on the stream.
Fields | |
---|---|
subscription |
The subscription name. Structured like: projects/ Authorization requires the following IAM permission on the specified resource
|
client_id |
An opaque, unique client identifier. This field must be exactly 16 bytes long and is interpreted as an unsigned 128 bit integer. Other size values will be rejected and the stream will be failed with a non-retryable error. This field is large enough to fit a uuid from standard uuid algorithms like uuid1 or uuid4, which should be used to generate this number. The same identifier should be reused following disconnections with retryable stream errors. |
InitialPublishRequest
The first request that must be sent on a newly-opened stream.
Fields | |
---|---|
topic |
The topic to which messages will be written. Authorization requires the following IAM permission on the specified resource
|
partition |
The partition within the topic to which messages will be written. Partitions are zero indexed, so |
InitialPublishResponse
Response to an InitialPublishRequest.
InitialSubscribeRequest
The first request that must be sent on a newly-opened stream. The client must wait for the response before sending subsequent requests on the stream.
Fields | |
---|---|
subscription |
The subscription from which to receive messages. Authorization requires the following IAM permission on the specified resource
|
partition |
The partition from which to receive messages. Partitions are zero indexed, so |
InitialSubscribeResponse
Response to an InitialSubscribeRequest.
Fields | |
---|---|
cursor |
The cursor from which the subscriber will start receiving messages once flow control tokens become available. |
ListPartitionCursorsRequest
Request for ListPartitionCursors.
Fields | |
---|---|
parent |
Required. The subscription for which to retrieve cursors. Structured like Authorization requires the following IAM permission on the specified resource
|
page_size |
The maximum number of cursors to return. The service may return fewer than this value. If unset or zero, all cursors for the parent will be returned. |
page_token |
A page token, received from a previous When paginating, all other parameters provided to |
ListPartitionCursorsResponse
Response for ListPartitionCursors
Fields | |
---|---|
partition_cursors[] |
The partition cursors from this request. |
next_page_token |
A token, which can be sent as |
ListSubscriptionsRequest
Request for ListSubscriptions.
Fields | |
---|---|
parent |
Required. The parent whose subscriptions are to be listed. Structured like Authorization requires the following IAM permission on the specified resource
|
page_size |
The maximum number of subscriptions to return. The service may return fewer than this value. If unset or zero, all subscriptions for the parent will be returned. |
page_token |
A page token, received from a previous When paginating, all other parameters provided to |
ListSubscriptionsResponse
Response for ListSubscriptions.
Fields | |
---|---|
subscriptions[] |
The list of subscriptions in the requested parent. The order of the subscriptions is unspecified. |
next_page_token |
A token that can be sent as |
ListTopicSubscriptionsRequest
Request for ListTopicSubscriptions.
Fields | |
---|---|
name |
Required. The name of the topic whose subscriptions to list. Authorization requires the following IAM permission on the specified resource
|
page_size |
The maximum number of subscriptions to return. The service may return fewer than this value. If unset or zero, all subscriptions for the given topic will be returned. |
page_token |
A page token, received from a previous When paginating, all other parameters provided to |
ListTopicSubscriptionsResponse
Response for ListTopicSubscriptions.
Fields | |
---|---|
subscriptions[] |
The names of subscriptions attached to the topic. The order of the subscriptions is unspecified. |
next_page_token |
A token that can be sent as |
ListTopicsRequest
Request for ListTopics.
Fields | |
---|---|
parent |
Required. The parent whose topics are to be listed. Structured like Authorization requires the following IAM permission on the specified resource
|
page_size |
The maximum number of topics to return. The service may return fewer than this value. If unset or zero, all topics for the parent will be returned. |
page_token |
A page token, received from a previous When paginating, all other parameters provided to |
ListTopicsResponse
Response for ListTopics.
Fields | |
---|---|
topics[] |
The list of topic in the requested parent. The order of the topics is unspecified. |
next_page_token |
A token that can be sent as |
MessagePublishRequest
Request to publish messages to the topic.
Fields | |
---|---|
messages[] |
The messages to publish. |
MessagePublishResponse
Response to a MessagePublishRequest.
Fields | |
---|---|
start_cursor |
The cursor of the first published message in the batch. The cursors for any remaining messages in the batch are guaranteed to be sequential. |
MessageResponse
Response containing a list of messages. Upon delivering a MessageResponse to the client, the server: * Updates the stream's delivery cursor to one greater than the cursor of the last message in the list. * Subtracts the total number of bytes and messages from the tokens available to the server.
Fields | |
---|---|
messages[] |
Messages from the topic partition. |
PartitionAssignment
PartitionAssignments should not race with acknowledgements. There should be exactly one unacknowledged PartitionAssignment at a time. If not, the client must break the stream.
Fields | |
---|---|
partitions[] |
The list of partition numbers this subscriber is assigned to. |
PartitionAssignmentAck
Acknowledge receipt and handling of the previous assignment. If not sent within a short period after receiving the assignment, partitions may remain unassigned for a period of time until the client is known to be inactive, after which time the server will break the stream.
PartitionAssignmentRequest
A request on the PartitionAssignment stream.
Fields | ||
---|---|---|
Union field request . The type of request this is. request can be only one of the following: |
||
initial |
Initial request on the stream. |
|
ack |
Acknowledgement of a partition assignment. |
PartitionCursor
A pair of a Cursor and the partition it is for.
Fields | |
---|---|
partition |
The partition this is for. |
cursor |
The value of the cursor. |
PubSubMessage
A message that is published by publishers and delivered to subscribers.
Fields | |
---|---|
key |
The key used for routing messages to partitions or for compaction (e.g., keep the last N messages per key). If the key is empty, the message is routed to an arbitrary partition. |
data |
The payload of the message. |
attributes |
Optional attributes that can be used for message metadata/headers. |
event_time |
An optional, user-specified event time. |
PublishRequest
Request sent from the client to the server on a stream.
Fields | ||
---|---|---|
Union field request_type . The type of request this is. request_type can be only one of the following: |
||
initial_request |
Initial request on the stream. |
|
message_publish_request |
Request to publish messages. |
PublishResponse
Response to a PublishRequest.
Fields | ||
---|---|---|
Union field response_type . The type of response this is. response_type can be only one of the following: |
||
initial_response |
Initial response on the stream. |
|
message_response |
Response to publishing messages. |
SeekRequest
Request to update the stream's delivery cursor based on the given target. Resets the server available tokens to 0. SeekRequests may not be sent while another SeekRequest is outstanding (i.e., has not received a SeekResponse) on the same stream. SeekRequests past head result in stream breakage.
Fields | ||
---|---|---|
Union field target . The target to seek to. Must be set. target can be only one of the following: |
||
named_target |
A named target. |
|
cursor |
A target corresponding to the cursor, pointing to anywhere in the topic partition. |
NamedTarget
A special target in the partition that takes no other parameters.
Enums | |
---|---|
NAMED_TARGET_UNSPECIFIED |
Default value. This value is unused. |
HEAD |
A target corresponding to the most recently published message in the partition. |
COMMITTED_CURSOR |
A target corresponding to the committed cursor for the given subscription and topic partition. |
SeekResponse
Response to a SeekRequest.
Fields | |
---|---|
cursor |
The new delivery cursor for the current stream. |
SequencedCommitCursorRequest
Streaming request to update the committed cursor. Subsequent SequencedCommitCursorRequests override outstanding ones.
Fields | |
---|---|
cursor |
The new value for the committed cursor. |
SequencedCommitCursorResponse
Response to a SequencedCommitCursorRequest.
Fields | |
---|---|
acknowledged_commits |
The number of outstanding SequencedCommitCursorRequests acknowledged by this response. Note that SequencedCommitCursorRequests are acknowledged in the order that they are received. |
SequencedMessage
A message that has been stored and sequenced by the Pub/Sub Lite system.
Fields | |
---|---|
cursor |
The position of a message within the partition where it is stored. |
publish_time |
The time when the message was received by the server when it was first published. |
message |
The user message. |
size_bytes |
The size in bytes of this message for flow control and quota purposes. |
StreamingCommitCursorRequest
A request sent from the client to the server on a stream.
Fields | ||
---|---|---|
Union field request . The type of request this is. request can be only one of the following: |
||
initial |
Initial request on the stream. |
|
commit |
Request to commit a new cursor value. |
StreamingCommitCursorResponse
Response to a StreamingCommitCursorRequest.
Fields | ||
---|---|---|
Union field request . The type of request this is. request can be only one of the following: |
||
initial |
Initial response on the stream. |
|
commit |
Response to committing a new cursor value. |
SubscribeRequest
A request sent from the client to the server on a stream.
Fields | ||
---|---|---|
Union field request . The type of request this is. request can be only one of the following: |
||
initial |
Initial request on the stream. |
|
seek |
Request to update the stream's delivery cursor. |
|
flow_control |
Request to grant tokens to the server, |
SubscribeResponse
Response to SubscribeRequest.
Fields | ||
---|---|---|
Union field response . The type of response this is. response can be only one of the following: |
||
initial |
Initial response on the stream. |
|
seek |
Response to a Seek operation. |
|
messages |
Response containing messages from the topic partition. |
Subscription
Metadata about a subscription resource.
Fields | |
---|---|
name |
The name of the subscription. Structured like: projects/{project_number}/locations/{location}/subscriptions/{subscription_id} |
topic |
The name of the topic this subscription is attached to. Structured like: projects/{project_number}/locations/{location}/topics/{topic_id} |
delivery_config |
The settings for this subscription's message delivery. |
DeliveryConfig
The settings for a subscription's message delivery.
Fields | |
---|---|
delivery_requirement |
The DeliveryRequirement for this subscription. |
DeliveryRequirement
When this subscription should send messages to subscribers relative to messages persistence in storage. For details, see Creating Lite subscriptions.
Enums | |
---|---|
DELIVERY_REQUIREMENT_UNSPECIFIED |
Default value. This value is unused. |
DELIVER_IMMEDIATELY |
The server does not wait for a published message to be successfully written to storage before delivering it to subscribers. |
DELIVER_AFTER_STORED |
The server will not deliver a published message to subscribers until the message has been successfully written to storage. This will result in higher end-to-end latency, but consistent delivery. |
Topic
Metadata about a topic resource.
Fields | |
---|---|
name |
The name of the topic. Structured like: projects/{project_number}/locations/{location}/topics/{topic_id} |
partition_config |
The settings for this topic's partitions. |
retention_config |
The settings for this topic's message retention. |
PartitionConfig
The settings for a topic's partitions.
Fields | ||
---|---|---|
count |
The number of partitions in the topic. Must be at least 1. |
|
Union field dimension . The throughput dimension of this topic. dimension can be only one of the following: |
||
scale |
DEPRECATED: Use capacity instead which can express a superset of configurations. Every partition in the topic is allocated throughput equivalent to |
|
capacity |
The capacity configuration. |
Capacity
The throughput capacity configuration for each partition.
Fields | |
---|---|
publish_mib_per_sec |
Publish throughput capacity per partition in MiB/s. Must be >= 4 and <= 16. |
subscribe_mib_per_sec |
Subscribe throughput capacity per partition in MiB/s. Must be >= 4 and <= 32. |
RetentionConfig
The settings for a topic's message retention.
Fields | |
---|---|
per_partition_bytes |
The provisioned storage, in bytes, per partition. If the number of bytes stored in any of the topic's partitions grows beyond this value, older messages will be dropped to make room for newer ones, regardless of the value of |
period |
How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below |
TopicPartitions
Response for GetTopicPartitions.
Fields | |
---|---|
partition_count |
The number of partitions in the topic. |
UpdateSubscriptionRequest
Request for UpdateSubscription.
Fields | |
---|---|
subscription |
Required. The subscription to update. Its Authorization requires the following IAM permission on the specified resource
|
update_mask |
Required. A mask specifying the subscription fields to change. |
UpdateTopicRequest
Request for UpdateTopic.
Fields | |
---|---|
topic |
Required. The topic to update. Its Authorization requires the following IAM permission on the specified resource
|
update_mask |
Required. A mask specifying the topic fields to change. |