@google-cloud/pubsub 2.18.2 → 2.19.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 +39 -0
- package/README.md +19 -19
- package/build/protos/google/pubsub/v1/pubsub.proto +50 -0
- package/build/protos/protos.d.ts +254 -32
- package/build/protos/protos.js +656 -34
- package/build/protos/protos.json +70 -0
- package/build/src/message-stream.d.ts +0 -7
- package/build/src/message-stream.js +6 -17
- package/build/src/message-stream.js.map +1 -1
- package/build/src/topic.d.ts +1 -1
- package/build/src/v1/index.js +1 -1
- package/build/src/v1/publisher_client.d.ts +18 -49
- package/build/src/v1/publisher_client.js +23 -31
- package/build/src/v1/publisher_client.js.map +1 -1
- package/build/src/v1/publisher_client_config.json +2 -2
- package/build/src/v1/schema_service_client.d.ts +12 -31
- package/build/src/v1/schema_service_client.js +11 -11
- package/build/src/v1/schema_service_client.js.map +1 -1
- package/build/src/v1/subscriber_client.d.ts +44 -78
- package/build/src/v1/subscriber_client.js +20 -30
- package/build/src/v1/subscriber_client.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,45 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/@google-cloud/pubsub?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [2.19.0](https://github.com/googleapis/nodejs-pubsub/compare/v2.18.5...v2.19.0) (2022-02-16)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* add exactly once delivery flag ([#1487](https://github.com/googleapis/nodejs-pubsub/issues/1487)) ([330061c](https://github.com/googleapis/nodejs-pubsub/commit/330061c71e26753b86c637a525742b4f5cb3f02c))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **deps:** update dependency google-gax to v2.29.5 ([#1474](https://github.com/googleapis/nodejs-pubsub/issues/1474)) ([f855db3](https://github.com/googleapis/nodejs-pubsub/commit/f855db312bcc0e9e885fa391f42b2509ceffc13f))
|
|
18
|
+
* **deps:** update dependency google-gax to v2.29.6 ([#1489](https://github.com/googleapis/nodejs-pubsub/issues/1489)) ([62aba28](https://github.com/googleapis/nodejs-pubsub/commit/62aba28ddb191091bc80e9a244b561cedc92f4fe))
|
|
19
|
+
* removing misspelled field, add correctly spelled field 🦉 Updates from OwlBot ([#1490](https://github.com/googleapis/nodejs-pubsub/issues/1490)) ([afb9cfe](https://github.com/googleapis/nodejs-pubsub/commit/afb9cfec83524c84d8e207e2b6298996df282a66))
|
|
20
|
+
|
|
21
|
+
### [2.18.5](https://github.com/googleapis/nodejs-pubsub/compare/v2.18.4...v2.18.5) (2022-01-21)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* **deps:** update dependency @opentelemetry/semantic-conventions to v1 ([#1407](https://github.com/googleapis/nodejs-pubsub/issues/1407)) ([740d78c](https://github.com/googleapis/nodejs-pubsub/commit/740d78cb285a136a39d7324c9f0e2e0d7fc1f06d))
|
|
27
|
+
* **deps:** update dependency google-gax to v2.29.0 ([#1452](https://github.com/googleapis/nodejs-pubsub/issues/1452)) ([f419137](https://github.com/googleapis/nodejs-pubsub/commit/f4191372eabc134454db7d24cb38a29597b153dd))
|
|
28
|
+
* **deps:** update dependency google-gax to v2.29.4 ([#1469](https://github.com/googleapis/nodejs-pubsub/issues/1469)) ([8abbfa7](https://github.com/googleapis/nodejs-pubsub/commit/8abbfa77ce9c6e6decbd79c29bcaad8e5e3e1ed6))
|
|
29
|
+
* update to work with latest node types (changed the return type of Stream.destroy()) ([#1464](https://github.com/googleapis/nodejs-pubsub/issues/1464)) ([fddc2e7](https://github.com/googleapis/nodejs-pubsub/commit/fddc2e77ed54c1762afb533965da2e0658b58de6))
|
|
30
|
+
|
|
31
|
+
### [2.18.4](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.18.3...v2.18.4) (2021-12-09)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* **deps:** update dependency google-gax to v2.28.1 ([#1432](https://www.github.com/googleapis/nodejs-pubsub/issues/1432)) ([98840fc](https://www.github.com/googleapis/nodejs-pubsub/commit/98840fcc38a05be07de6e7dc97d8a79616940df9))
|
|
37
|
+
|
|
38
|
+
### [2.18.3](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.18.2...v2.18.3) (2021-11-18)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
* set only Publish to 5000ms ([#1416](https://www.github.com/googleapis/nodejs-pubsub/issues/1416)) ([1e11001](https://www.github.com/googleapis/nodejs-pubsub/commit/1e110016ea04fc41d2fa80d64a54a11fd4078c60))
|
|
44
|
+
* temporary hold-back on google-gax to avoid timeout issues caused by https://github.com/googleapis/gax-nodejs/pull/1100 ([#1431](https://www.github.com/googleapis/nodejs-pubsub/issues/1431)) ([18c6b18](https://www.github.com/googleapis/nodejs-pubsub/commit/18c6b18f621c410aca968a6bfc850e7a6ea404f4))
|
|
45
|
+
|
|
7
46
|
### [2.18.2](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.18.1...v2.18.2) (2021-11-08)
|
|
8
47
|
|
|
9
48
|
|
package/README.md
CHANGED
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
# [Google Cloud Pub/Sub: Node.js Client](https://github.com/googleapis/nodejs-pubsub)
|
|
6
6
|
|
|
7
|
-
[](https://cloud.google.com/terms/launch-stages)
|
|
8
8
|
[](https://www.npmjs.org/package/@google-cloud/pubsub)
|
|
9
|
-
[](https://codecov.io/gh/googleapis/nodejs-pubsub)
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
|
|
@@ -71,14 +70,14 @@ const {PubSub} = require('@google-cloud/pubsub');
|
|
|
71
70
|
|
|
72
71
|
async function quickstart(
|
|
73
72
|
projectId = 'your-project-id', // Your Google Cloud Platform project ID
|
|
74
|
-
|
|
73
|
+
topicNameOrId = 'my-topic', // Name for the new topic to create
|
|
75
74
|
subscriptionName = 'my-sub' // Name for the new subscription to create
|
|
76
75
|
) {
|
|
77
76
|
// Instantiates a client
|
|
78
77
|
const pubsub = new PubSub({projectId});
|
|
79
78
|
|
|
80
79
|
// Creates a new topic
|
|
81
|
-
const [topic] = await pubsub.createTopic(
|
|
80
|
+
const [topic] = await pubsub.createTopic(topicNameOrId);
|
|
82
81
|
console.log(`Topic ${topic.name} created.`);
|
|
83
82
|
|
|
84
83
|
// Creates a subscription on that new topic
|
|
@@ -182,37 +181,38 @@ also contains samples.
|
|
|
182
181
|
Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/).
|
|
183
182
|
Libraries are compatible with all current _active_ and _maintenance_ versions of
|
|
184
183
|
Node.js.
|
|
184
|
+
If you are using an end-of-life version of Node.js, we recommend that you update
|
|
185
|
+
as soon as possible to an actively supported LTS version.
|
|
185
186
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
The dist-tags follow the naming convention `legacy-(version)`.
|
|
189
|
-
|
|
190
|
-
_Legacy Node.js versions are supported as a best effort:_
|
|
191
|
-
|
|
192
|
-
* Legacy versions will not be tested in continuous integration.
|
|
193
|
-
* Some security patches may not be able to be backported.
|
|
194
|
-
* Dependencies will not be kept up-to-date, and features will not be backported.
|
|
187
|
+
Google's client libraries support legacy versions of Node.js runtimes on a
|
|
188
|
+
best-efforts basis with the following warnings:
|
|
195
189
|
|
|
196
|
-
|
|
190
|
+
* Legacy versions are not tested in continuous integration.
|
|
191
|
+
* Some security patches and features cannot be backported.
|
|
192
|
+
* Dependencies cannot be kept up-to-date.
|
|
197
193
|
|
|
198
|
-
|
|
199
|
-
|
|
194
|
+
Client libraries targeting some end-of-life versions of Node.js are available, and
|
|
195
|
+
can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
|
|
196
|
+
The dist-tags follow the naming convention `legacy-(version)`.
|
|
197
|
+
For example, `npm install @google-cloud/pubsub@legacy-8` installs client libraries
|
|
198
|
+
for versions compatible with Node.js 8.
|
|
200
199
|
|
|
201
200
|
## Versioning
|
|
202
201
|
|
|
203
202
|
This library follows [Semantic Versioning](http://semver.org/).
|
|
204
203
|
|
|
205
204
|
|
|
206
|
-
|
|
207
|
-
is stable
|
|
205
|
+
|
|
206
|
+
This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
|
|
208
207
|
unless absolutely necessary (e.g. because of critical security issues) or with
|
|
209
|
-
an extensive deprecation period. Issues and requests against **
|
|
208
|
+
an extensive deprecation period. Issues and requests against **stable** libraries
|
|
210
209
|
are addressed with the highest priority.
|
|
211
210
|
|
|
212
211
|
|
|
213
212
|
|
|
214
213
|
|
|
215
214
|
|
|
215
|
+
|
|
216
216
|
More Information: [Google Cloud Platform Launch Stages][launch_stages]
|
|
217
217
|
|
|
218
218
|
[launch_stages]: https://cloud.google.com/terms/launch-stages
|
|
@@ -752,6 +752,19 @@ message Subscription {
|
|
|
752
752
|
// the endpoint will not be made.
|
|
753
753
|
bool detached = 15;
|
|
754
754
|
|
|
755
|
+
// If true, Pub/Sub provides the following guarantees for the delivery of
|
|
756
|
+
// a message with a given value of `message_id` on this subscription:
|
|
757
|
+
//
|
|
758
|
+
// * The message sent to a subscriber is guaranteed not to be resent
|
|
759
|
+
// before the message's acknowledgement deadline expires.
|
|
760
|
+
// * An acknowledged message will not be resent to a subscriber.
|
|
761
|
+
//
|
|
762
|
+
// Note that subscribers may still receive multiple copies of a message
|
|
763
|
+
// when `enable_exactly_once_delivery` is true if the message was published
|
|
764
|
+
// multiple times by a publisher client. These copies are considered distinct
|
|
765
|
+
// by Pub/Sub and have distinct `message_id` values.
|
|
766
|
+
bool enable_exactly_once_delivery = 16;
|
|
767
|
+
|
|
755
768
|
// Output only. Indicates the minimum duration for which a message is retained
|
|
756
769
|
// after it is published to the subscription's topic. If this field is set,
|
|
757
770
|
// messages published to the subscription's topic in the last
|
|
@@ -1163,8 +1176,35 @@ message StreamingPullRequest {
|
|
|
1163
1176
|
// Response for the `StreamingPull` method. This response is used to stream
|
|
1164
1177
|
// messages from the server to the client.
|
|
1165
1178
|
message StreamingPullResponse {
|
|
1179
|
+
// Acknowledgement IDs sent in one or more previous requests to acknowledge a
|
|
1180
|
+
// previously received message.
|
|
1181
|
+
message AcknowledgeConfirmation {
|
|
1182
|
+
// Successfully processed acknowledgement IDs.
|
|
1183
|
+
repeated string ack_ids = 1 [ctype = CORD];
|
|
1184
|
+
|
|
1185
|
+
// List of acknowledgement IDs that were malformed or whose acknowledgement
|
|
1186
|
+
// deadline has expired.
|
|
1187
|
+
repeated string invalid_ack_ids = 2 [ctype = CORD];
|
|
1188
|
+
|
|
1189
|
+
// List of acknowledgement IDs that were out of order.
|
|
1190
|
+
repeated string unordered_ack_ids = 3 [ctype = CORD];
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
// Acknowledgement IDs sent in one or more previous requests to modify the
|
|
1194
|
+
// deadline for a specific message.
|
|
1195
|
+
message ModifyAckDeadlineConfirmation {
|
|
1196
|
+
// Successfully processed acknowledgement IDs.
|
|
1197
|
+
repeated string ack_ids = 1 [ctype = CORD];
|
|
1198
|
+
|
|
1199
|
+
// List of acknowledgement IDs that were malformed or whose acknowledgement
|
|
1200
|
+
// deadline has expired.
|
|
1201
|
+
repeated string invalid_ack_ids = 2 [ctype = CORD];
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1166
1204
|
// Subscription properties sent as part of the response.
|
|
1167
1205
|
message SubscriptionProperties {
|
|
1206
|
+
// True iff exactly once delivery is enabled for this subscription.
|
|
1207
|
+
bool exactly_once_delivery_enabled = 1;
|
|
1168
1208
|
// True iff message ordering is enabled for this subscription.
|
|
1169
1209
|
bool message_ordering_enabled = 2;
|
|
1170
1210
|
}
|
|
@@ -1172,6 +1212,16 @@ message StreamingPullResponse {
|
|
|
1172
1212
|
// Received Pub/Sub messages. This will not be empty.
|
|
1173
1213
|
repeated ReceivedMessage received_messages = 1;
|
|
1174
1214
|
|
|
1215
|
+
reserved 2;
|
|
1216
|
+
|
|
1217
|
+
// This field will only be set if `enable_exactly_once_delivery` is set to
|
|
1218
|
+
// `true`.
|
|
1219
|
+
AcknowledgeConfirmation acknowledge_confirmation = 5;
|
|
1220
|
+
|
|
1221
|
+
// This field will only be set if `enable_exactly_once_delivery` is set to
|
|
1222
|
+
// `true`.
|
|
1223
|
+
ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3;
|
|
1224
|
+
|
|
1175
1225
|
// Properties associated with this subscription.
|
|
1176
1226
|
SubscriptionProperties subscription_properties = 4;
|
|
1177
1227
|
}
|