@google-cloud/pubsub 2.18.5 → 2.19.3
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 +37 -0
- package/README.md +15 -14
- package/build/protos/google/pubsub/v1/pubsub.proto +50 -0
- package/build/protos/protos.d.ts +253 -31
- package/build/protos/protos.js +655 -33
- package/build/protos/protos.json +70 -0
- package/build/src/message-queues.js +4 -1
- package/build/src/message-queues.js.map +1 -1
- package/build/src/pubsub.js +9 -1
- package/build/src/pubsub.js.map +1 -1
- package/build/src/subscriber.js +1 -0
- package/build/src/subscriber.js.map +1 -1
- package/build/src/subscription.d.ts +6 -0
- package/build/src/subscription.js +8 -0
- package/build/src/subscription.js.map +1 -1
- package/build/src/v1/publisher_client.d.ts +0 -18
- package/build/src/v1/publisher_client.js +1 -8
- package/build/src/v1/publisher_client.js.map +1 -1
- package/build/src/v1/schema_service_client.d.ts +0 -12
- package/build/src/v1/schema_service_client.js +1 -4
- package/build/src/v1/schema_service_client.js.map +1 -1
- package/build/src/v1/subscriber_client.d.ts +12 -32
- package/build/src/v1/subscriber_client.js +10 -9
- package/build/src/v1/subscriber_client.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,43 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/@google-cloud/pubsub?activeTab=versions
|
|
6
6
|
|
|
7
|
+
### [2.19.3](https://github.com/googleapis/nodejs-pubsub/compare/v2.19.2...v2.19.3) (2022-04-26)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **deps:** update dependency google-gax to v2.30.2 ([#1502](https://github.com/googleapis/nodejs-pubsub/issues/1502)) ([37d075e](https://github.com/googleapis/nodejs-pubsub/commit/37d075e6ae4e588155a9f0c0506b9a497be6bf06))
|
|
13
|
+
|
|
14
|
+
### [2.19.2](https://github.com/googleapis/nodejs-pubsub/compare/v2.19.1...v2.19.2) (2022-04-21)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* fix flaky schema and subscription tests ([#1518](https://github.com/googleapis/nodejs-pubsub/issues/1518)) ([5ff0105](https://github.com/googleapis/nodejs-pubsub/commit/5ff0105cf84751beb6f06343aaf5228157faae4d))
|
|
20
|
+
|
|
21
|
+
### [2.19.1](https://github.com/googleapis/nodejs-pubsub/compare/v2.19.0...v2.19.1) (2022-04-06)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* **deps:** update dependency google-gax to v2.29.7 ([#1493](https://github.com/googleapis/nodejs-pubsub/issues/1493)) ([c8921a7](https://github.com/googleapis/nodejs-pubsub/commit/c8921a7af9205c15c5485f3a3d1c607483a69de4))
|
|
27
|
+
* **deps:** update dependency google-gax to v2.30.0 ([#1496](https://github.com/googleapis/nodejs-pubsub/issues/1496)) ([073a1b8](https://github.com/googleapis/nodejs-pubsub/commit/073a1b86ab516ad78985ce3d09ff16cbdf56151e))
|
|
28
|
+
* update grpc.max_metadata_size to 4MiB for exactly-once, and shift ack/modack errors to 'debug' stream channel ([#1505](https://github.com/googleapis/nodejs-pubsub/issues/1505)) ([abd10cc](https://github.com/googleapis/nodejs-pubsub/commit/abd10cc0c9956256bd06e5b48a412ec0af6dd086))
|
|
29
|
+
|
|
30
|
+
## [2.19.0](https://github.com/googleapis/nodejs-pubsub/compare/v2.18.5...v2.19.0) (2022-02-16)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* add exactly once delivery flag ([#1487](https://github.com/googleapis/nodejs-pubsub/issues/1487)) ([330061c](https://github.com/googleapis/nodejs-pubsub/commit/330061c71e26753b86c637a525742b4f5cb3f02c))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
|
|
40
|
+
* **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))
|
|
41
|
+
* **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))
|
|
42
|
+
* 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))
|
|
43
|
+
|
|
7
44
|
### [2.18.5](https://github.com/googleapis/nodejs-pubsub/compare/v2.18.4...v2.18.5) (2022-01-21)
|
|
8
45
|
|
|
9
46
|
|
package/README.md
CHANGED
|
@@ -70,14 +70,14 @@ const {PubSub} = require('@google-cloud/pubsub');
|
|
|
70
70
|
|
|
71
71
|
async function quickstart(
|
|
72
72
|
projectId = 'your-project-id', // Your Google Cloud Platform project ID
|
|
73
|
-
|
|
73
|
+
topicNameOrId = 'my-topic', // Name for the new topic to create
|
|
74
74
|
subscriptionName = 'my-sub' // Name for the new subscription to create
|
|
75
75
|
) {
|
|
76
76
|
// Instantiates a client
|
|
77
77
|
const pubsub = new PubSub({projectId});
|
|
78
78
|
|
|
79
79
|
// Creates a new topic
|
|
80
|
-
const [topic] = await pubsub.createTopic(
|
|
80
|
+
const [topic] = await pubsub.createTopic(topicNameOrId);
|
|
81
81
|
console.log(`Topic ${topic.name} created.`);
|
|
82
82
|
|
|
83
83
|
// Creates a subscription on that new topic
|
|
@@ -128,6 +128,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-pubsub/tree
|
|
|
128
128
|
| Create Push Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/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) |
|
|
129
129
|
| Create Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/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) |
|
|
130
130
|
| Create Subscription With Dead Letter Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/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) |
|
|
131
|
+
| Create Subscription With Filtering | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createSubscriptionWithFiltering.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/createSubscriptionWithFiltering.js,samples/README.md) |
|
|
131
132
|
| Create Subscription with ordering enabled | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createSubscriptionWithOrdering.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/createSubscriptionWithOrdering.js,samples/README.md) |
|
|
132
133
|
| Create Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/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) |
|
|
133
134
|
| Create Topic With Schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createTopicWithSchema.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/createTopicWithSchema.js,samples/README.md) |
|
|
@@ -181,21 +182,21 @@ also contains samples.
|
|
|
181
182
|
Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/).
|
|
182
183
|
Libraries are compatible with all current _active_ and _maintenance_ versions of
|
|
183
184
|
Node.js.
|
|
185
|
+
If you are using an end-of-life version of Node.js, we recommend that you update
|
|
186
|
+
as soon as possible to an actively supported LTS version.
|
|
184
187
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
The dist-tags follow the naming convention `legacy-(version)`.
|
|
188
|
-
|
|
189
|
-
_Legacy Node.js versions are supported as a best effort:_
|
|
188
|
+
Google's client libraries support legacy versions of Node.js runtimes on a
|
|
189
|
+
best-efforts basis with the following warnings:
|
|
190
190
|
|
|
191
|
-
* Legacy versions
|
|
192
|
-
* Some security patches
|
|
193
|
-
* Dependencies
|
|
191
|
+
* Legacy versions are not tested in continuous integration.
|
|
192
|
+
* Some security patches and features cannot be backported.
|
|
193
|
+
* Dependencies cannot be kept up-to-date.
|
|
194
194
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
Client libraries targeting some end-of-life versions of Node.js are available, and
|
|
196
|
+
can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
|
|
197
|
+
The dist-tags follow the naming convention `legacy-(version)`.
|
|
198
|
+
For example, `npm install @google-cloud/pubsub@legacy-8` installs client libraries
|
|
199
|
+
for versions compatible with Node.js 8.
|
|
199
200
|
|
|
200
201
|
## Versioning
|
|
201
202
|
|
|
@@ -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
|
}
|