@google-cloud/pubsub 4.10.0 → 5.0.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 +28 -0
- package/README.md +5 -2
- package/build/protos/protos.d.ts +6 -6
- package/build/protos/protos.js +423 -141
- package/build/protos/protos.json +39 -18
- package/build/src/debug.js +2 -0
- package/build/src/debug.js.map +1 -1
- package/build/src/default-options.d.ts +2 -2
- package/build/src/default-options.js +3 -3
- package/build/src/default-options.js.map +1 -1
- package/build/src/exponential-retry.js +4 -1
- package/build/src/exponential-retry.js.map +1 -1
- package/build/src/histogram.js +3 -0
- package/build/src/histogram.js.map +1 -1
- package/build/src/iam.js +3 -0
- package/build/src/iam.js.map +1 -1
- package/build/src/index.d.ts +0 -2
- package/build/src/index.js +1 -5
- package/build/src/index.js.map +1 -1
- package/build/src/lease-manager.d.ts +0 -3
- package/build/src/lease-manager.js +14 -19
- package/build/src/lease-manager.js.map +1 -1
- package/build/src/message-queues.js +31 -23
- package/build/src/message-queues.js.map +1 -1
- package/build/src/message-stream.js +13 -4
- package/build/src/message-stream.js.map +1 -1
- package/build/src/publisher/flow-control.js +4 -1
- package/build/src/publisher/flow-control.js.map +1 -1
- package/build/src/publisher/flow-publisher.js +5 -2
- package/build/src/publisher/flow-publisher.js.map +1 -1
- package/build/src/publisher/index.d.ts +0 -2
- package/build/src/publisher/index.js +11 -8
- package/build/src/publisher/index.js.map +1 -1
- package/build/src/publisher/message-batch.d.ts +0 -11
- package/build/src/publisher/message-batch.js +13 -1
- package/build/src/publisher/message-batch.js.map +1 -1
- package/build/src/publisher/message-queues.js +10 -3
- package/build/src/publisher/message-queues.js.map +1 -1
- package/build/src/publisher/publish-error.js +5 -0
- package/build/src/publisher/publish-error.js.map +1 -1
- package/build/src/publisher/pubsub-message.d.ts +0 -68
- package/build/src/pubsub.js +14 -5
- package/build/src/pubsub.js.map +1 -1
- package/build/src/schema.js +3 -0
- package/build/src/schema.js.map +1 -1
- package/build/src/snapshot.js +3 -0
- package/build/src/snapshot.js.map +1 -1
- package/build/src/subscriber.d.ts +11 -15
- package/build/src/subscriber.js +84 -26
- package/build/src/subscriber.js.map +1 -1
- package/build/src/subscription.js +11 -2
- package/build/src/subscription.js.map +1 -1
- package/build/src/telemetry-tracing.d.ts +2 -220
- package/build/src/telemetry-tracing.js +39 -111
- package/build/src/telemetry-tracing.js.map +1 -1
- package/build/src/temporal.js +8 -8
- package/build/src/temporal.js.map +1 -1
- package/build/src/topic.js +8 -1
- package/build/src/topic.js.map +1 -1
- package/build/src/util.js +3 -2
- package/build/src/util.js.map +1 -1
- package/build/src/v1/publisher_client.d.ts +26 -4
- package/build/src/v1/publisher_client.js +232 -90
- package/build/src/v1/publisher_client.js.map +1 -1
- package/build/src/v1/publisher_proto_list.json +4 -0
- package/build/src/v1/schema_service_client.d.ts +24 -3
- package/build/src/v1/schema_service_client.js +235 -75
- package/build/src/v1/schema_service_client.js.map +1 -1
- package/build/src/v1/schema_service_proto_list.json +4 -0
- package/build/src/v1/subscriber_client.d.ts +39 -3
- package/build/src/v1/subscriber_client.js +327 -97
- package/build/src/v1/subscriber_client.js.map +1 -1
- package/build/src/v1/subscriber_proto_list.json +4 -0
- package/package.json +43 -45
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,34 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/@google-cloud/pubsub?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [5.0.0](https://github.com/googleapis/nodejs-pubsub/compare/v4.11.0...v5.0.0) (2025-04-28)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
|
|
12
|
+
* migrate to Node 18 ([#2024](https://github.com/googleapis/nodejs-pubsub/issues/2024))
|
|
13
|
+
* remove (broken) legacy OTel support
|
|
14
|
+
* remove legacy ack deadline options
|
|
15
|
+
* move maxExtension into subscriber options
|
|
16
|
+
|
|
17
|
+
### Miscellaneous Chores
|
|
18
|
+
|
|
19
|
+
* Migrate to Node 18 ([#2024](https://github.com/googleapis/nodejs-pubsub/issues/2024)) ([9ad808a](https://github.com/googleapis/nodejs-pubsub/commit/9ad808adb99b6e64c2c4431991721deae14b6400))
|
|
20
|
+
|
|
21
|
+
## [4.11.0](https://github.com/googleapis/nodejs-pubsub/compare/v4.10.0...v4.11.0) (2025-03-27)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* Add required messaging.operation span attrs for OTel sem convs 1.24 ([#2019](https://github.com/googleapis/nodejs-pubsub/issues/2019)) ([70ed2d7](https://github.com/googleapis/nodejs-pubsub/commit/70ed2d73588290834dd25bfffb201272433e5614))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* **deps:** Update dependency @opentelemetry/semantic-conventions to ~1.29.0 ([#2012](https://github.com/googleapis/nodejs-pubsub/issues/2012)) ([bfe8243](https://github.com/googleapis/nodejs-pubsub/commit/bfe82434492a95fc24ee54ff947d0e52d5e93195))
|
|
32
|
+
* **deps:** Update dependency @opentelemetry/semantic-conventions to ~1.30.0 ([#2014](https://github.com/googleapis/nodejs-pubsub/issues/2014)) ([7f8366a](https://github.com/googleapis/nodejs-pubsub/commit/7f8366a636398d758aec5b2f933607f5021043a7))
|
|
33
|
+
* Type widening to match gapic, and two typing fixes ([#2020](https://github.com/googleapis/nodejs-pubsub/issues/2020)) ([9cd73b3](https://github.com/googleapis/nodejs-pubsub/commit/9cd73b33980b7f02fe507a3a52042112690ab62c))
|
|
34
|
+
|
|
7
35
|
## [4.10.0](https://github.com/googleapis/nodejs-pubsub/compare/v4.9.0...v4.10.0) (2025-01-13)
|
|
8
36
|
|
|
9
37
|
|
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ const {PubSub} = require('@google-cloud/pubsub');
|
|
|
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
|
-
subscriptionName = 'my-sub' // Name for the new subscription to create
|
|
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});
|
|
@@ -96,7 +96,7 @@ async function quickstart(
|
|
|
96
96
|
});
|
|
97
97
|
|
|
98
98
|
// Send a message to the topic
|
|
99
|
-
topic.publishMessage({data: Buffer.from('Test message!')});
|
|
99
|
+
await topic.publishMessage({data: Buffer.from('Test message!')});
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
```
|
|
@@ -138,7 +138,10 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-pubsub/tree
|
|
|
138
138
|
| 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) |
|
|
139
139
|
| Create Subscription With Retry Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createSubscriptionWithRetryPolicy.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/createSubscriptionWithRetryPolicy.js,samples/README.md) |
|
|
140
140
|
| 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) |
|
|
141
|
+
| Create Topic With AWS MSK Ingestion | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createTopicWithAwsMskIngestion.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/createTopicWithAwsMskIngestion.js,samples/README.md) |
|
|
142
|
+
| Create Topic With Azure Event Hubs Ingestion | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createTopicWithAzureEventHubsIngestion.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/createTopicWithAzureEventHubsIngestion.js,samples/README.md) |
|
|
141
143
|
| Create Topic With Cloud Storage Ingestion | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createTopicWithCloudStorageIngestion.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/createTopicWithCloudStorageIngestion.js,samples/README.md) |
|
|
144
|
+
| Create Topic With Confluent Cloud Ingestion | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createTopicWithConfluentCloudIngestion.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/createTopicWithConfluentCloudIngestion.js,samples/README.md) |
|
|
142
145
|
| Create Topic With Kinesis Ingestion | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createTopicWithKinesisIngestion.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/createTopicWithKinesisIngestion.js,samples/README.md) |
|
|
143
146
|
| 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) |
|
|
144
147
|
| Create Topic With Schema Revisions | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createTopicWithSchemaRevisions.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/createTopicWithSchemaRevisions.js,samples/README.md) |
|
package/build/protos/protos.d.ts
CHANGED
|
@@ -2658,7 +2658,7 @@ export namespace google {
|
|
|
2658
2658
|
interface IPubsubMessage {
|
|
2659
2659
|
|
|
2660
2660
|
/** PubsubMessage data */
|
|
2661
|
-
data?: (Uint8Array|string|null);
|
|
2661
|
+
data?: (Uint8Array|Buffer|string|null);
|
|
2662
2662
|
|
|
2663
2663
|
/** PubsubMessage attributes */
|
|
2664
2664
|
attributes?: ({ [k: string]: string }|null);
|
|
@@ -2683,7 +2683,7 @@ export namespace google {
|
|
|
2683
2683
|
constructor(properties?: google.pubsub.v1.IPubsubMessage);
|
|
2684
2684
|
|
|
2685
2685
|
/** PubsubMessage data. */
|
|
2686
|
-
public data: (Uint8Array|string);
|
|
2686
|
+
public data: (Uint8Array|Buffer|string);
|
|
2687
2687
|
|
|
2688
2688
|
/** PubsubMessage attributes. */
|
|
2689
2689
|
public attributes: { [k: string]: string };
|
|
@@ -10303,7 +10303,7 @@ export namespace google {
|
|
|
10303
10303
|
schema?: (google.pubsub.v1.ISchema|null);
|
|
10304
10304
|
|
|
10305
10305
|
/** ValidateMessageRequest message */
|
|
10306
|
-
message?: (Uint8Array|string|null);
|
|
10306
|
+
message?: (Uint8Array|Buffer|string|null);
|
|
10307
10307
|
|
|
10308
10308
|
/** ValidateMessageRequest encoding */
|
|
10309
10309
|
encoding?: (google.pubsub.v1.Encoding|keyof typeof google.pubsub.v1.Encoding|null);
|
|
@@ -10328,7 +10328,7 @@ export namespace google {
|
|
|
10328
10328
|
public schema?: (google.pubsub.v1.ISchema|null);
|
|
10329
10329
|
|
|
10330
10330
|
/** ValidateMessageRequest message. */
|
|
10331
|
-
public message: (Uint8Array|string);
|
|
10331
|
+
public message: (Uint8Array|Buffer|string);
|
|
10332
10332
|
|
|
10333
10333
|
/** ValidateMessageRequest encoding. */
|
|
10334
10334
|
public encoding: (google.pubsub.v1.Encoding|keyof typeof google.pubsub.v1.Encoding);
|
|
@@ -15684,7 +15684,7 @@ export namespace google {
|
|
|
15684
15684
|
doubleValue?: (number|null);
|
|
15685
15685
|
|
|
15686
15686
|
/** UninterpretedOption stringValue */
|
|
15687
|
-
stringValue?: (Uint8Array|string|null);
|
|
15687
|
+
stringValue?: (Uint8Array|Buffer|string|null);
|
|
15688
15688
|
|
|
15689
15689
|
/** UninterpretedOption aggregateValue */
|
|
15690
15690
|
aggregateValue?: (string|null);
|
|
@@ -15715,7 +15715,7 @@ export namespace google {
|
|
|
15715
15715
|
public doubleValue: number;
|
|
15716
15716
|
|
|
15717
15717
|
/** UninterpretedOption stringValue. */
|
|
15718
|
-
public stringValue: (Uint8Array|string);
|
|
15718
|
+
public stringValue: (Uint8Array|Buffer|string);
|
|
15719
15719
|
|
|
15720
15720
|
/** UninterpretedOption aggregateValue. */
|
|
15721
15721
|
public aggregateValue: string;
|