@@ -164,7 +164,8 @@ message PubsubMessage {
164164 // at least one attribute.
165165 bytes data = 1 ;
166166
167- // Optional attributes for this message.
167+ // Attributes for this message. If this field is empty, the message must
168+ // contain non-empty data.
168169 map <string , string > attributes = 2 ;
169170
170171 // ID of this message, assigned by the server when the message is published.
@@ -178,10 +179,12 @@ message PubsubMessage {
178179 // publisher in a `Publish` call.
179180 google.protobuf.Timestamp publish_time = 4 ;
180181
181- // Identifies related messages for which publish order should be respected.
182- // If a `Subscription` has `enable_message_ordering` set to `true`, messages
183- // published with the same `ordering_key` value will be delivered to
184- // subscribers in the order in which they are received by the Pub/Sub system.
182+ // If non-empty, identifies related messages for which publish order should be
183+ // respected. If a `Subscription` has `enable_message_ordering` set to `true`,
184+ // messages published with the same non-empty `ordering_key` value will be
185+ // delivered to subscribers in the order in which they are received by the
186+ // Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
187+ // must specify the same `ordering_key` value.
185188 // <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
186189 // API might be changed in backward-incompatible ways and is not recommended
187190 // for production use. It is not subject to any SLA or deprecation policy.
@@ -922,6 +925,14 @@ message StreamingPullRequest {
922925 // requests from client to server. The minimum deadline you can specify is 10
923926 // seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
924927 int32 stream_ack_deadline_seconds = 5 ;
928+
929+ // A unique identifier that is used to distinguish client instances from each
930+ // other. Only needs to be provided on the initial request. When a stream
931+ // disconnects and reconnects for the same stream, the client_id should be set
932+ // to the same value so that state associated with the old stream can be
933+ // transferred to the new stream. The same client_id should not be used for
934+ // different client instances.
935+ string client_id = 6 ;
925936}
926937
927938// Response for the `StreamingPull` method. This response is used to stream
@@ -933,13 +944,12 @@ message StreamingPullResponse {
933944
934945// Request for the `CreateSnapshot` method.
935946message CreateSnapshotRequest {
936- // Optional user-provided name for this snapshot.
937- // If the name is not provided in the request, the server will assign a random
938- // name for this snapshot on the same project as the subscription.
939- // Note that for REST API requests, you must specify a name. See the
940- // <a href="https://cloud.google.com/pubsub/docs/admin#resource_names">
941- // resource name rules</a>.
942- // Format is `projects/{project}/snapshots/{snap}`.
947+ // User-provided name for this snapshot. If the name is not provided in the
948+ // request, the server will assign a random name for this snapshot on the same
949+ // project as the subscription. Note that for REST API requests, you must
950+ // specify a name. See the <a
951+ // href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource
952+ // name rules</a>. Format is `projects/{project}/snapshots/{snap}`.
943953 string name = 1 ;
944954
945955 // The subscription whose backlog the snapshot retains.
0 commit comments