@google-cloud/pubsub 2.1.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/README.md +8 -0
- package/build/protos/google/pubsub/v1/pubsub.proto +85 -77
- package/build/protos/protos.d.ts +19 -1
- package/build/protos/protos.js +210 -32
- package/build/protos/protos.json +12 -0
- package/build/src/default-options.js +1 -0
- package/build/src/default-options.js.map +1 -1
- package/build/src/histogram.js +1 -0
- package/build/src/histogram.js.map +1 -1
- package/build/src/iam.js +1 -0
- package/build/src/iam.js.map +1 -1
- package/build/src/index.d.ts +1 -1
- package/build/src/index.js +7 -6
- package/build/src/index.js.map +1 -1
- package/build/src/lease-manager.d.ts +2 -2
- package/build/src/lease-manager.js +1 -0
- package/build/src/lease-manager.js.map +1 -1
- package/build/src/message-queues.d.ts +1 -1
- package/build/src/message-queues.js +1 -0
- package/build/src/message-queues.js.map +1 -1
- package/build/src/message-stream.js +3 -0
- package/build/src/message-stream.js.map +1 -1
- package/build/src/opentelemetry-tracing.d.ts +30 -0
- package/build/src/opentelemetry-tracing.js +41 -0
- package/build/src/opentelemetry-tracing.js.map +1 -0
- package/build/src/publisher/index.d.ts +23 -0
- package/build/src/publisher/index.js +57 -2
- package/build/src/publisher/index.js.map +1 -1
- package/build/src/publisher/message-batch.d.ts +3 -3
- package/build/src/publisher/message-batch.js +4 -3
- package/build/src/publisher/message-batch.js.map +1 -1
- package/build/src/publisher/message-queues.d.ts +1 -1
- package/build/src/publisher/message-queues.js +1 -0
- package/build/src/publisher/message-queues.js.map +1 -1
- package/build/src/publisher/publish-error.js +1 -0
- package/build/src/publisher/publish-error.js.map +1 -1
- package/build/src/pubsub.d.ts +20 -7
- package/build/src/pubsub.js +96 -15
- package/build/src/pubsub.js.map +1 -1
- package/build/src/pull-retry.js +1 -0
- package/build/src/pull-retry.js.map +1 -1
- package/build/src/snapshot.js +1 -0
- package/build/src/snapshot.js.map +1 -1
- package/build/src/subscriber.d.ts +15 -4
- package/build/src/subscriber.js +51 -7
- package/build/src/subscriber.js.map +1 -1
- package/build/src/subscription.d.ts +7 -3
- package/build/src/subscription.js +42 -0
- package/build/src/subscription.js.map +1 -1
- package/build/src/topic.js +1 -0
- package/build/src/topic.js.map +1 -1
- package/build/src/util.js +1 -0
- package/build/src/util.js.map +1 -1
- package/build/src/v1/index.js +2 -2
- package/build/src/v1/index.js.map +1 -1
- package/build/src/v1/publisher_client.d.ts +4 -4
- package/build/src/v1/publisher_client.js +25 -22
- package/build/src/v1/publisher_client.js.map +1 -1
- package/build/src/v1/subscriber_client.d.ts +4 -4
- package/build/src/v1/subscriber_client.js +55 -61
- package/build/src/v1/subscriber_client.js.map +1 -1
- package/package.json +16 -10
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,56 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/@google-cloud/pubsub?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [2.5.0](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.4.0...v2.5.0) (2020-08-17)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Opentelemetry integration ([#1078](https://www.github.com/googleapis/nodejs-pubsub/issues/1078)) ([76db007](https://www.github.com/googleapis/nodejs-pubsub/commit/76db007f270a646e8570768fa827ea2a97b62cbc)), closes [#1066](https://www.github.com/googleapis/nodejs-pubsub/issues/1066) [#1070](https://www.github.com/googleapis/nodejs-pubsub/issues/1070)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* make request batching work again ([#1087](https://www.github.com/googleapis/nodejs-pubsub/issues/1087)) ([80e0ee3](https://www.github.com/googleapis/nodejs-pubsub/commit/80e0ee3a4ef0da325e61ce2b869f4c0f9829b136))
|
|
18
|
+
* properly handle non-emulator alternate endpoints for pub/sub ([#1060](https://www.github.com/googleapis/nodejs-pubsub/issues/1060)) ([195ebf6](https://www.github.com/googleapis/nodejs-pubsub/commit/195ebf648e00ba35f567cef06a06c31f3f9c57d9))
|
|
19
|
+
* **deps:** update opentelemetry monorepo to ^0.10.0 ([#1090](https://www.github.com/googleapis/nodejs-pubsub/issues/1090)) ([78a45ff](https://www.github.com/googleapis/nodejs-pubsub/commit/78a45ff1cb8fb921e5ca05e435554d684a777185))
|
|
20
|
+
* update minimum gax version to 2.7.0 to fix recent protobuf errors ([#1085](https://www.github.com/googleapis/nodejs-pubsub/issues/1085)) ([904348c](https://www.github.com/googleapis/nodejs-pubsub/commit/904348cd6471f267a54635fcd65fe4191896308e))
|
|
21
|
+
|
|
22
|
+
## [2.4.0](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.3.0...v2.4.0) (2020-08-08)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* update to TypeScript 3.8+ to match gax/protobufjs (to allow things to compile again) ([#1079](https://www.github.com/googleapis/nodejs-pubsub/issues/1079)) ([cd39d38](https://www.github.com/googleapis/nodejs-pubsub/commit/cd39d38c525b3ed0383c63eb379c96aed6f53d94))
|
|
28
|
+
|
|
29
|
+
## [2.3.0](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.2.0...v2.3.0) (2020-07-20)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
|
|
34
|
+
* Add support for server-side flow control ([#1041](https://www.github.com/googleapis/nodejs-pubsub/issues/1041)) ([a53f6c7](https://www.github.com/googleapis/nodejs-pubsub/commit/a53f6c755317f2fdcb107989321a78fa05e0c455))
|
|
35
|
+
* support for detaching subscriptions ([#1032](https://www.github.com/googleapis/nodejs-pubsub/issues/1032)) ([c5af3a9](https://www.github.com/googleapis/nodejs-pubsub/commit/c5af3a9988e318c3d884aed1777010faa8545ab1))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
|
|
40
|
+
* typeo in nodejs .gitattribute ([#1049](https://www.github.com/googleapis/nodejs-pubsub/issues/1049)) ([b4c6dc0](https://www.github.com/googleapis/nodejs-pubsub/commit/b4c6dc0264a4f62283ceb3b5e1e2ae58e06c56c1))
|
|
41
|
+
|
|
42
|
+
## [2.2.0](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.1.0...v2.2.0) (2020-07-09)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Features
|
|
46
|
+
|
|
47
|
+
* add flow control settings for StreamingPullRequest to pubsub.proto ([#1035](https://www.github.com/googleapis/nodejs-pubsub/issues/1035)) ([a7dff65](https://www.github.com/googleapis/nodejs-pubsub/commit/a7dff65c1a4115e75251b775f679e6beb092928e))
|
|
48
|
+
* move ts target to es2018 from es2016 ([#1022](https://www.github.com/googleapis/nodejs-pubsub/issues/1022)) ([016568d](https://www.github.com/googleapis/nodejs-pubsub/commit/016568df466c2a543762ab4f194b785a426ad880))
|
|
49
|
+
* Re-export ClientConfig from pubsub.ts in package index.ts ([#1038](https://www.github.com/googleapis/nodejs-pubsub/issues/1038)) ([c2ac083](https://www.github.com/googleapis/nodejs-pubsub/commit/c2ac083fdb5f3b71dcb3be482b8ee5c9d527342d)), closes [#972](https://www.github.com/googleapis/nodejs-pubsub/issues/972)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Bug Fixes
|
|
53
|
+
|
|
54
|
+
* handle fallback option properly ([#1028](https://www.github.com/googleapis/nodejs-pubsub/issues/1028)) ([5dc1827](https://www.github.com/googleapis/nodejs-pubsub/commit/5dc18270220dbf39f5a871716b4dd9d002d0c536))
|
|
55
|
+
* update node issue template ([#1033](https://www.github.com/googleapis/nodejs-pubsub/issues/1033)) ([52ba0ae](https://www.github.com/googleapis/nodejs-pubsub/commit/52ba0ae0218c0859a03d8ad9e4f27130ceb4cc61))
|
|
56
|
+
|
|
7
57
|
## [2.1.0](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.0.0...v2.1.0) (2020-06-02)
|
|
8
58
|
|
|
9
59
|
|
package/README.md
CHANGED
|
@@ -22,6 +22,9 @@ For additional help developing Pub/Sub applications, in Node.js and other langua
|
|
|
22
22
|
guides.
|
|
23
23
|
|
|
24
24
|
|
|
25
|
+
A comprehensive list of changes in each version may be found in
|
|
26
|
+
[the CHANGELOG](https://github.com/googleapis/nodejs-pubsub/blob/master/CHANGELOG.md).
|
|
27
|
+
|
|
25
28
|
* [Google Cloud Pub/Sub Node.js Client API Reference][client-docs]
|
|
26
29
|
* [Google Cloud Pub/Sub Documentation][product-docs]
|
|
27
30
|
* [github.com/googleapis/nodejs-pubsub](https://github.com/googleapis/nodejs-pubsub)
|
|
@@ -105,9 +108,11 @@ has instructions for running the samples.
|
|
|
105
108
|
| --------------------------- | --------------------------------- | ------ |
|
|
106
109
|
| Create Push Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/createPushSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createPushSubscription.js,samples/README.md) |
|
|
107
110
|
| Create Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/createSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createSubscription.js,samples/README.md) |
|
|
111
|
+
| Create Subscription With Dead Letter Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/createSubscriptionWithDeadLetterPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createSubscriptionWithDeadLetterPolicy.js,samples/README.md) |
|
|
108
112
|
| Create Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/createTopic.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createTopic.js,samples/README.md) |
|
|
109
113
|
| Delete Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/deleteSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/deleteSubscription.js,samples/README.md) |
|
|
110
114
|
| Delete Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/deleteTopic.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/deleteTopic.js,samples/README.md) |
|
|
115
|
+
| Detach Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/detachSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/detachSubscription.js,samples/README.md) |
|
|
111
116
|
| Get Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/getSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/getSubscription.js,samples/README.md) |
|
|
112
117
|
| Get Subscription Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/getSubscriptionPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/getSubscriptionPolicy.js,samples/README.md) |
|
|
113
118
|
| Get Topic Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/getTopicPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/getTopicPolicy.js,samples/README.md) |
|
|
@@ -124,13 +129,16 @@ has instructions for running the samples.
|
|
|
124
129
|
| Publish Ordered Message | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/publishOrderedMessage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishOrderedMessage.js,samples/README.md) |
|
|
125
130
|
| Publish With Retry Settings | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/publishWithRetrySettings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishWithRetrySettings.js,samples/README.md) |
|
|
126
131
|
| Quickstart | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
|
|
132
|
+
| Remove Dead Letter Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/removeDeadLetterPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/removeDeadLetterPolicy.js,samples/README.md) |
|
|
127
133
|
| Set Subscription IAM Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/setSubscriptionPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/setSubscriptionPolicy.js,samples/README.md) |
|
|
128
134
|
| Set Topic IAM Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/setTopicPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/setTopicPolicy.js,samples/README.md) |
|
|
129
135
|
| Subscribe With Flow Control Settings | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/subscribeWithFlowControlSettings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/subscribeWithFlowControlSettings.js,samples/README.md) |
|
|
130
136
|
| Synchronous Pull | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/synchronousPull.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/synchronousPull.js,samples/README.md) |
|
|
137
|
+
| Synchronous Pull with delivery attempt. | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/synchronousPullWithDeliveryAttempts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/synchronousPullWithDeliveryAttempts.js,samples/README.md) |
|
|
131
138
|
| Synchronous Pull With Lease Management | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/synchronousPullWithLeaseManagement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/synchronousPullWithLeaseManagement.js,samples/README.md) |
|
|
132
139
|
| Test Subscription Permissions | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/testSubscriptionPermissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/testSubscriptionPermissions.js,samples/README.md) |
|
|
133
140
|
| Test Topic Permissions | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/testTopicPermissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/testTopicPermissions.js,samples/README.md) |
|
|
141
|
+
| Update Dead Letter Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/updateDeadLetterPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/updateDeadLetterPolicy.js,samples/README.md) |
|
|
134
142
|
|
|
135
143
|
|
|
136
144
|
|
|
@@ -42,9 +42,8 @@ service Publisher {
|
|
|
42
42
|
"https://www.googleapis.com/auth/cloud-platform,"
|
|
43
43
|
"https://www.googleapis.com/auth/pubsub";
|
|
44
44
|
|
|
45
|
-
// Creates the given topic with the given name. See the
|
|
46
|
-
//
|
|
47
|
-
// resource name rules</a>.
|
|
45
|
+
// Creates the given topic with the given name. See the [resource name rules](
|
|
46
|
+
// https://cloud.google.com/pubsub/docs/admin#resource_names).
|
|
48
47
|
rpc CreateTopic(Topic) returns (Topic) {
|
|
49
48
|
option (google.api.http) = {
|
|
50
49
|
put: "/v1/{name=projects/*/topics/*}"
|
|
@@ -98,11 +97,10 @@ service Publisher {
|
|
|
98
97
|
}
|
|
99
98
|
|
|
100
99
|
// Lists the names of the snapshots on this topic. Snapshots are used in
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
// captured by a snapshot.
|
|
100
|
+
// [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
|
|
101
|
+
// which allow you to manage message acknowledgments in bulk. That is, you can
|
|
102
|
+
// set the acknowledgment state of messages in an existing subscription to the
|
|
103
|
+
// state captured by a snapshot.
|
|
106
104
|
rpc ListTopicSnapshots(ListTopicSnapshotsRequest)
|
|
107
105
|
returns (ListTopicSnapshotsResponse) {
|
|
108
106
|
option (google.api.http) = {
|
|
@@ -135,6 +133,7 @@ service Publisher {
|
|
|
135
133
|
}
|
|
136
134
|
}
|
|
137
135
|
|
|
136
|
+
// A policy constraining the storage of messages published to the topic.
|
|
138
137
|
message MessageStoragePolicy {
|
|
139
138
|
// A list of IDs of GCP regions where messages that are published to the topic
|
|
140
139
|
// may be persisted in storage. Messages published by publishers running in
|
|
@@ -160,8 +159,8 @@ message Topic {
|
|
|
160
159
|
// must not start with `"goog"`.
|
|
161
160
|
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
|
162
161
|
|
|
163
|
-
// See
|
|
164
|
-
//
|
|
162
|
+
// See [Creating and managing labels]
|
|
163
|
+
// (https://cloud.google.com/pubsub/docs/labels).
|
|
165
164
|
map<string, string> labels = 2;
|
|
166
165
|
|
|
167
166
|
// Policy constraining the set of Google Cloud Platform regions where messages
|
|
@@ -179,18 +178,19 @@ message Topic {
|
|
|
179
178
|
// A message that is published by publishers and consumed by subscribers. The
|
|
180
179
|
// message must contain either a non-empty data field or at least one attribute.
|
|
181
180
|
// Note that client libraries represent this object differently
|
|
182
|
-
// depending on the language. See the corresponding
|
|
183
|
-
//
|
|
184
|
-
//
|
|
185
|
-
//
|
|
186
|
-
//
|
|
181
|
+
// depending on the language. See the corresponding [client library
|
|
182
|
+
// documentation](https://cloud.google.com/pubsub/docs/reference/libraries) for
|
|
183
|
+
// more information. See [quotas and limits]
|
|
184
|
+
// (https://cloud.google.com/pubsub/quotas) for more information about message
|
|
185
|
+
// limits.
|
|
187
186
|
message PubsubMessage {
|
|
188
187
|
// The message data field. If this field is empty, the message must contain
|
|
189
188
|
// at least one attribute.
|
|
190
189
|
bytes data = 1;
|
|
191
190
|
|
|
192
191
|
// Attributes for this message. If this field is empty, the message must
|
|
193
|
-
// contain non-empty data.
|
|
192
|
+
// contain non-empty data. This can be used to filter messages on the
|
|
193
|
+
// subscription.
|
|
194
194
|
map<string, string> attributes = 2;
|
|
195
195
|
|
|
196
196
|
// ID of this message, assigned by the server when the message is published.
|
|
@@ -210,9 +210,6 @@ message PubsubMessage {
|
|
|
210
210
|
// delivered to subscribers in the order in which they are received by the
|
|
211
211
|
// Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
|
|
212
212
|
// must specify the same `ordering_key` value.
|
|
213
|
-
// <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
|
|
214
|
-
// API might be changed in backward-incompatible ways and is not recommended
|
|
215
|
-
// for production use. It is not subject to any SLA or deprecation policy.
|
|
216
213
|
string ordering_key = 5;
|
|
217
214
|
}
|
|
218
215
|
|
|
@@ -386,19 +383,17 @@ service Subscriber {
|
|
|
386
383
|
"https://www.googleapis.com/auth/cloud-platform,"
|
|
387
384
|
"https://www.googleapis.com/auth/pubsub";
|
|
388
385
|
|
|
389
|
-
// Creates a subscription to a given topic. See the
|
|
390
|
-
//
|
|
391
|
-
// resource name rules</a>.
|
|
386
|
+
// Creates a subscription to a given topic. See the [resource name rules]
|
|
387
|
+
// (https://cloud.google.com/pubsub/docs/admin#resource_names).
|
|
392
388
|
// If the subscription already exists, returns `ALREADY_EXISTS`.
|
|
393
389
|
// If the corresponding topic doesn't exist, returns `NOT_FOUND`.
|
|
394
390
|
//
|
|
395
391
|
// If the name is not provided in the request, the server will assign a random
|
|
396
392
|
// name for this subscription on the same project as the topic, conforming
|
|
397
|
-
// to the
|
|
398
|
-
//
|
|
399
|
-
//
|
|
400
|
-
//
|
|
401
|
-
// for REST API requests, you must specify a name in the request.
|
|
393
|
+
// to the [resource name format]
|
|
394
|
+
// (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated
|
|
395
|
+
// name is populated in the returned Subscription object. Note that for REST
|
|
396
|
+
// API requests, you must specify a name in the request.
|
|
402
397
|
rpc CreateSubscription(Subscription) returns (Subscription) {
|
|
403
398
|
option (google.api.http) = {
|
|
404
399
|
put: "/v1/{name=projects/*/subscriptions/*}"
|
|
@@ -526,12 +521,11 @@ service Subscriber {
|
|
|
526
521
|
option (google.api.method_signature) = "snapshot";
|
|
527
522
|
}
|
|
528
523
|
|
|
529
|
-
// Lists the existing snapshots. Snapshots are used in
|
|
530
|
-
//
|
|
531
|
-
//
|
|
532
|
-
//
|
|
533
|
-
//
|
|
534
|
-
// captured by a snapshot.
|
|
524
|
+
// Lists the existing snapshots. Snapshots are used in [Seek](
|
|
525
|
+
// https://cloud.google.com/pubsub/docs/replay-overview) operations, which
|
|
526
|
+
// allow you to manage message acknowledgments in bulk. That is, you can set
|
|
527
|
+
// the acknowledgment state of messages in an existing subscription to the
|
|
528
|
+
// state captured by a snapshot.
|
|
535
529
|
rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) {
|
|
536
530
|
option (google.api.http) = {
|
|
537
531
|
get: "/v1/{project=projects/*}/snapshots"
|
|
@@ -540,21 +534,19 @@ service Subscriber {
|
|
|
540
534
|
}
|
|
541
535
|
|
|
542
536
|
// Creates a snapshot from the requested subscription. Snapshots are used in
|
|
543
|
-
//
|
|
544
|
-
//
|
|
545
|
-
//
|
|
546
|
-
//
|
|
547
|
-
//
|
|
548
|
-
// <br><br>If the snapshot already exists, returns `ALREADY_EXISTS`.
|
|
537
|
+
// [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
|
|
538
|
+
// which allow you to manage message acknowledgments in bulk. That is, you can
|
|
539
|
+
// set the acknowledgment state of messages in an existing subscription to the
|
|
540
|
+
// state captured by a snapshot.
|
|
541
|
+
// If the snapshot already exists, returns `ALREADY_EXISTS`.
|
|
549
542
|
// If the requested subscription doesn't exist, returns `NOT_FOUND`.
|
|
550
543
|
// If the backlog in the subscription is too old -- and the resulting snapshot
|
|
551
544
|
// would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
|
|
552
545
|
// See also the `Snapshot.expire_time` field. If the name is not provided in
|
|
553
546
|
// the request, the server will assign a random
|
|
554
547
|
// name for this snapshot on the same project as the subscription, conforming
|
|
555
|
-
// to the
|
|
556
|
-
//
|
|
557
|
-
// format](https://cloud.google.com/pubsub/docs/admin#resource_names). The
|
|
548
|
+
// to the [resource name format]
|
|
549
|
+
// (https://cloud.google.com/pubsub/docs/admin#resource_names). The
|
|
558
550
|
// generated name is populated in the returned Snapshot object. Note that for
|
|
559
551
|
// REST API requests, you must specify a name in the request.
|
|
560
552
|
rpc CreateSnapshot(CreateSnapshotRequest) returns (Snapshot) {
|
|
@@ -578,12 +570,11 @@ service Subscriber {
|
|
|
578
570
|
};
|
|
579
571
|
}
|
|
580
572
|
|
|
581
|
-
// Removes an existing snapshot. Snapshots are used in
|
|
582
|
-
//
|
|
583
|
-
//
|
|
584
|
-
//
|
|
585
|
-
//
|
|
586
|
-
// captured by a snapshot.<br><br>
|
|
573
|
+
// Removes an existing snapshot. Snapshots are used in [Seek]
|
|
574
|
+
// (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
|
|
575
|
+
// allow you to manage message acknowledgments in bulk. That is, you can set
|
|
576
|
+
// the acknowledgment state of messages in an existing subscription to the
|
|
577
|
+
// state captured by a snapshot.
|
|
587
578
|
// When the snapshot is deleted, all messages retained in the snapshot
|
|
588
579
|
// are immediately dropped. After a snapshot is deleted, a new one may be
|
|
589
580
|
// created with the same name, but the new one has no association with the old
|
|
@@ -596,13 +587,12 @@ service Subscriber {
|
|
|
596
587
|
}
|
|
597
588
|
|
|
598
589
|
// Seeks an existing subscription to a point in time or to a given snapshot,
|
|
599
|
-
// whichever is provided in the request. Snapshots are used in
|
|
600
|
-
//
|
|
601
|
-
//
|
|
602
|
-
//
|
|
603
|
-
//
|
|
604
|
-
//
|
|
605
|
-
// must be on the same topic.
|
|
590
|
+
// whichever is provided in the request. Snapshots are used in [Seek](
|
|
591
|
+
// https://cloud.google.com/pubsub/docs/replay-overview) operations, which
|
|
592
|
+
// allow you to manage message acknowledgments in bulk. That is, you can set
|
|
593
|
+
// the acknowledgment state of messages in an existing subscription to the
|
|
594
|
+
// state captured by a snapshot. Note that both the subscription and the
|
|
595
|
+
// snapshot must be on the same topic.
|
|
606
596
|
rpc Seek(SeekRequest) returns (SeekResponse) {
|
|
607
597
|
option (google.api.http) = {
|
|
608
598
|
post: "/v1/{subscription=projects/*/subscriptions/*}:seek"
|
|
@@ -664,10 +654,8 @@ message Subscription {
|
|
|
664
654
|
// Indicates whether to retain acknowledged messages. If true, then
|
|
665
655
|
// messages are not expunged from the subscription's backlog, even if they are
|
|
666
656
|
// acknowledged, until they fall out of the `message_retention_duration`
|
|
667
|
-
// window. This must be true if you would like to
|
|
668
|
-
//
|
|
669
|
-
// href="https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time">
|
|
670
|
-
// Seek to a timestamp</a>.
|
|
657
|
+
// window. This must be true if you would like to [Seek to a timestamp]
|
|
658
|
+
// (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time).
|
|
671
659
|
bool retain_acked_messages = 7;
|
|
672
660
|
|
|
673
661
|
// How long to retain unacknowledged messages in the subscription's backlog,
|
|
@@ -686,9 +674,6 @@ message Subscription {
|
|
|
686
674
|
// will be delivered to the subscribers in the order in which they
|
|
687
675
|
// are received by the Pub/Sub system. Otherwise, they may be delivered in
|
|
688
676
|
// any order.
|
|
689
|
-
// <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
|
|
690
|
-
// API might be changed in backward-incompatible ways and is not recommended
|
|
691
|
-
// for production use. It is not subject to any SLA or deprecation policy.
|
|
692
677
|
bool enable_message_ordering = 10;
|
|
693
678
|
|
|
694
679
|
// A policy that specifies the conditions for this subscription's expiration.
|
|
@@ -699,13 +684,11 @@ message Subscription {
|
|
|
699
684
|
// value for `expiration_policy.ttl` is 1 day.
|
|
700
685
|
ExpirationPolicy expiration_policy = 11;
|
|
701
686
|
|
|
702
|
-
// An expression written in the
|
|
687
|
+
// An expression written in the Pub/Sub [filter
|
|
688
|
+
// language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
|
|
703
689
|
// then only `PubsubMessage`s whose `attributes` field matches the filter are
|
|
704
690
|
// delivered on this subscription. If empty, then no messages are filtered
|
|
705
691
|
// out.
|
|
706
|
-
// <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
|
|
707
|
-
// API might be changed in backward-incompatible ways and is not recommended
|
|
708
|
-
// for production use. It is not subject to any SLA or deprecation policy.
|
|
709
692
|
string filter = 12;
|
|
710
693
|
|
|
711
694
|
// A policy that specifies the conditions for dead lettering messages in
|
|
@@ -718,17 +701,21 @@ message Subscription {
|
|
|
718
701
|
// permission to Acknowledge() messages on this subscription.
|
|
719
702
|
DeadLetterPolicy dead_letter_policy = 13;
|
|
720
703
|
|
|
721
|
-
// A policy that specifies how
|
|
704
|
+
// A policy that specifies how Pub/Sub retries message delivery for this
|
|
722
705
|
// subscription.
|
|
723
706
|
//
|
|
724
707
|
// If not set, the default retry policy is applied. This generally implies
|
|
725
708
|
// that messages will be retried as soon as possible for healthy subscribers.
|
|
726
709
|
// RetryPolicy will be triggered on NACKs or acknowledgement deadline
|
|
727
710
|
// exceeded events for a given message.
|
|
728
|
-
// <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
|
|
729
|
-
// ways and is not recommended for production use. It is not subject to any
|
|
730
|
-
// SLA or deprecation policy.
|
|
731
711
|
RetryPolicy retry_policy = 14;
|
|
712
|
+
|
|
713
|
+
// Indicates whether the subscription is detached from its topic. Detached
|
|
714
|
+
// subscriptions don't receive messages from their topic and don't retain any
|
|
715
|
+
// backlog. `Pull` and `StreamingPull` requests will return
|
|
716
|
+
// FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
|
|
717
|
+
// the endpoint will not be made.
|
|
718
|
+
bool detached = 15;
|
|
732
719
|
}
|
|
733
720
|
|
|
734
721
|
// A policy that specifies how Cloud Pub/Sub retries message delivery.
|
|
@@ -1105,6 +1092,28 @@ message StreamingPullRequest {
|
|
|
1105
1092
|
// transferred to the new stream. The same client_id should not be used for
|
|
1106
1093
|
// different client instances.
|
|
1107
1094
|
string client_id = 6;
|
|
1095
|
+
|
|
1096
|
+
// Flow control settings for the maximum number of outstanding messages. When
|
|
1097
|
+
// there are `max_outstanding_messages` or more currently sent to the
|
|
1098
|
+
// streaming pull client that have not yet been acked or nacked, the server
|
|
1099
|
+
// stops sending more messages. The sending of messages resumes once the
|
|
1100
|
+
// number of outstanding messages is less than this value. If the value is
|
|
1101
|
+
// <= 0, there is no limit to the number of outstanding messages. This
|
|
1102
|
+
// property can only be set on the initial StreamingPullRequest. If it is set
|
|
1103
|
+
// on a subsequent request, the stream will be aborted with status
|
|
1104
|
+
// `INVALID_ARGUMENT`.
|
|
1105
|
+
int64 max_outstanding_messages = 7;
|
|
1106
|
+
|
|
1107
|
+
// Flow control settings for the maximum number of outstanding bytes. When
|
|
1108
|
+
// there are `max_outstanding_bytes` or more worth of messages currently sent
|
|
1109
|
+
// to the streaming pull client that have not yet been acked or nacked, the
|
|
1110
|
+
// server will stop sending more messages. The sending of messages resumes
|
|
1111
|
+
// once the number of outstanding bytes is less than this value. If the value
|
|
1112
|
+
// is <= 0, there is no limit to the number of outstanding bytes. This
|
|
1113
|
+
// property can only be set on the initial StreamingPullRequest. If it is set
|
|
1114
|
+
// on a subsequent request, the stream will be aborted with status
|
|
1115
|
+
// `INVALID_ARGUMENT`.
|
|
1116
|
+
int64 max_outstanding_bytes = 8;
|
|
1108
1117
|
}
|
|
1109
1118
|
|
|
1110
1119
|
// Response for the `StreamingPull` method. This response is used to stream
|
|
@@ -1160,11 +1169,10 @@ message UpdateSnapshotRequest {
|
|
|
1160
1169
|
}
|
|
1161
1170
|
|
|
1162
1171
|
// A snapshot resource. Snapshots are used in
|
|
1163
|
-
//
|
|
1164
|
-
// operations, which allow
|
|
1165
|
-
// you
|
|
1166
|
-
//
|
|
1167
|
-
// captured by a snapshot.
|
|
1172
|
+
// [Seek](https://cloud.google.com/pubsub/docs/replay-overview)
|
|
1173
|
+
// operations, which allow you to manage message acknowledgments in bulk. That
|
|
1174
|
+
// is, you can set the acknowledgment state of messages in an existing
|
|
1175
|
+
// subscription to the state captured by a snapshot.
|
|
1168
1176
|
message Snapshot {
|
|
1169
1177
|
option (google.api.resource) = {
|
|
1170
1178
|
type: "pubsub.googleapis.com/Snapshot"
|
|
@@ -1191,8 +1199,8 @@ message Snapshot {
|
|
|
1191
1199
|
// snapshot that would expire in less than 1 hour after creation.
|
|
1192
1200
|
google.protobuf.Timestamp expire_time = 3;
|
|
1193
1201
|
|
|
1194
|
-
// See
|
|
1195
|
-
//
|
|
1202
|
+
// See [Creating and managing labels]
|
|
1203
|
+
// (https://cloud.google.com/pubsub/docs/labels).
|
|
1196
1204
|
map<string, string> labels = 4;
|
|
1197
1205
|
}
|
|
1198
1206
|
|
package/build/protos/protos.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
|
|
15
15
|
import * as Long from "long";
|
|
16
|
-
import
|
|
16
|
+
import {protobuf as $protobuf} from "google-gax";
|
|
17
17
|
/** Namespace google. */
|
|
18
18
|
export namespace google {
|
|
19
19
|
|
|
@@ -2176,6 +2176,9 @@ export namespace google {
|
|
|
2176
2176
|
|
|
2177
2177
|
/** Subscription retryPolicy */
|
|
2178
2178
|
retryPolicy?: (google.pubsub.v1.IRetryPolicy|null);
|
|
2179
|
+
|
|
2180
|
+
/** Subscription detached */
|
|
2181
|
+
detached?: (boolean|null);
|
|
2179
2182
|
}
|
|
2180
2183
|
|
|
2181
2184
|
/** Represents a Subscription. */
|
|
@@ -2223,6 +2226,9 @@ export namespace google {
|
|
|
2223
2226
|
/** Subscription retryPolicy. */
|
|
2224
2227
|
public retryPolicy?: (google.pubsub.v1.IRetryPolicy|null);
|
|
2225
2228
|
|
|
2229
|
+
/** Subscription detached. */
|
|
2230
|
+
public detached: boolean;
|
|
2231
|
+
|
|
2226
2232
|
/**
|
|
2227
2233
|
* Creates a new Subscription instance using the specified properties.
|
|
2228
2234
|
* @param [properties] Properties to set
|
|
@@ -3862,6 +3868,12 @@ export namespace google {
|
|
|
3862
3868
|
|
|
3863
3869
|
/** StreamingPullRequest clientId */
|
|
3864
3870
|
clientId?: (string|null);
|
|
3871
|
+
|
|
3872
|
+
/** StreamingPullRequest maxOutstandingMessages */
|
|
3873
|
+
maxOutstandingMessages?: (number|Long|string|null);
|
|
3874
|
+
|
|
3875
|
+
/** StreamingPullRequest maxOutstandingBytes */
|
|
3876
|
+
maxOutstandingBytes?: (number|Long|string|null);
|
|
3865
3877
|
}
|
|
3866
3878
|
|
|
3867
3879
|
/** Represents a StreamingPullRequest. */
|
|
@@ -3891,6 +3903,12 @@ export namespace google {
|
|
|
3891
3903
|
/** StreamingPullRequest clientId. */
|
|
3892
3904
|
public clientId: string;
|
|
3893
3905
|
|
|
3906
|
+
/** StreamingPullRequest maxOutstandingMessages. */
|
|
3907
|
+
public maxOutstandingMessages: (number|Long|string);
|
|
3908
|
+
|
|
3909
|
+
/** StreamingPullRequest maxOutstandingBytes. */
|
|
3910
|
+
public maxOutstandingBytes: (number|Long|string);
|
|
3911
|
+
|
|
3894
3912
|
/**
|
|
3895
3913
|
* Creates a new StreamingPullRequest instance using the specified properties.
|
|
3896
3914
|
* @param [properties] Properties to set
|