@google-cloud/pubsub 4.7.2 → 4.8.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 +8 -0
- package/README.md +4 -2
- package/build/protos/google/pubsub/v1/pubsub.proto +141 -1
- package/build/protos/protos.d.ts +660 -1
- package/build/protos/protos.js +1656 -50
- package/build/protos/protos.json +163 -1
- package/build/src/index.d.ts +1 -1
- package/build/src/index.js +2 -1
- package/build/src/index.js.map +1 -1
- package/build/src/message-stream.js +3 -2
- package/build/src/message-stream.js.map +1 -1
- package/build/src/subscriber.d.ts +1 -1
- package/build/src/subscriber.js +3 -1
- package/build/src/subscriber.js.map +1 -1
- package/build/src/v1/subscriber_client.d.ts +4 -1
- package/build/src/v1/subscriber_client.js.map +1 -1
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/@google-cloud/pubsub?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [4.8.0](https://github.com/googleapis/nodejs-pubsub/compare/v4.7.2...v4.8.0) (2024-10-15)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Add ingestion Cloud Storage fields and Platform Logging fields to Topic ([#1974](https://github.com/googleapis/nodejs-pubsub/issues/1974)) ([afec9a1](https://github.com/googleapis/nodejs-pubsub/commit/afec9a1ad3f665a71f08e748623f0fdaa332d17b))
|
|
13
|
+
* Return listing information for subscriptions created via Analytics Hub ([afec9a1](https://github.com/googleapis/nodejs-pubsub/commit/afec9a1ad3f665a71f08e748623f0fdaa332d17b))
|
|
14
|
+
|
|
7
15
|
## [4.7.2](https://github.com/googleapis/nodejs-pubsub/compare/v4.7.1...v4.7.2) (2024-09-13)
|
|
8
16
|
|
|
9
17
|
|
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
|
52
52
|
1. [Select or create a Cloud Platform project][projects].
|
|
53
53
|
1. [Enable billing for your project][billing].
|
|
54
54
|
1. [Enable the Google Cloud Pub/Sub API][enable_api].
|
|
55
|
-
1. [Set up authentication
|
|
55
|
+
1. [Set up authentication][auth] so you can access the
|
|
56
56
|
API from your local workstation.
|
|
57
57
|
|
|
58
58
|
### Installing the client library
|
|
@@ -138,6 +138,7 @@ 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 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) |
|
|
141
142
|
| 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) |
|
|
142
143
|
| 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) |
|
|
143
144
|
| 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) |
|
|
@@ -165,6 +166,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-pubsub/tree
|
|
|
165
166
|
| Listen For Messages With Custom Attributes | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listenWithCustomAttributes.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/listenWithCustomAttributes.js,samples/README.md) |
|
|
166
167
|
| Subscribe with OpenTelemetry Tracing | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listenWithOpenTelemetryTracing.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/listenWithOpenTelemetryTracing.js,samples/README.md) |
|
|
167
168
|
| Modify Push Configuration | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/modifyPushConfig.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/modifyPushConfig.js,samples/README.md) |
|
|
169
|
+
| Optimistic Subscribe | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/optimisticSubscribe.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/optimisticSubscribe.js,samples/README.md) |
|
|
168
170
|
| Publish Avro Records to a Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishAvroRecords.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/publishAvroRecords.js,samples/README.md) |
|
|
169
171
|
| Publish Batched Messages | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishBatchedMessages.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/publishBatchedMessages.js,samples/README.md) |
|
|
170
172
|
| Publish Message | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishMessage.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/publishMessage.js,samples/README.md) |
|
|
@@ -259,4 +261,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-pubsub/blob/main/LICENSE)
|
|
|
259
261
|
[projects]: https://console.cloud.google.com/project
|
|
260
262
|
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
|
261
263
|
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=pubsub.googleapis.com
|
|
262
|
-
[auth]: https://cloud.google.com/docs/authentication/
|
|
264
|
+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
|
|
@@ -237,11 +237,132 @@ message IngestionDataSourceSettings {
|
|
|
237
237
|
string gcp_service_account = 5 [(google.api.field_behavior) = REQUIRED];
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
+
// Ingestion settings for Cloud Storage.
|
|
241
|
+
message CloudStorage {
|
|
242
|
+
// Possible states for ingestion from Cloud Storage.
|
|
243
|
+
enum State {
|
|
244
|
+
// Default value. This value is unused.
|
|
245
|
+
STATE_UNSPECIFIED = 0;
|
|
246
|
+
|
|
247
|
+
// Ingestion is active.
|
|
248
|
+
ACTIVE = 1;
|
|
249
|
+
|
|
250
|
+
// Permission denied encountered while calling the Cloud Storage API. This
|
|
251
|
+
// can happen if the Pub/Sub SA has not been granted the
|
|
252
|
+
// [appropriate
|
|
253
|
+
// permissions](https://cloud.google.com/storage/docs/access-control/iam-permissions):
|
|
254
|
+
// - storage.objects.list: to list the objects in a bucket.
|
|
255
|
+
// - storage.objects.get: to read the objects in a bucket.
|
|
256
|
+
// - storage.buckets.get: to verify the bucket exists.
|
|
257
|
+
CLOUD_STORAGE_PERMISSION_DENIED = 2;
|
|
258
|
+
|
|
259
|
+
// Permission denied encountered while publishing to the topic. This can
|
|
260
|
+
// happen if the Pub/Sub SA has not been granted the [appropriate publish
|
|
261
|
+
// permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
|
|
262
|
+
PUBLISH_PERMISSION_DENIED = 3;
|
|
263
|
+
|
|
264
|
+
// The provided Cloud Storage bucket doesn't exist.
|
|
265
|
+
BUCKET_NOT_FOUND = 4;
|
|
266
|
+
|
|
267
|
+
// The Cloud Storage bucket has too many objects, ingestion will be
|
|
268
|
+
// paused.
|
|
269
|
+
TOO_MANY_OBJECTS = 5;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// Configuration for reading Cloud Storage data in text format. Each line of
|
|
273
|
+
// text as specified by the delimiter will be set to the `data` field of a
|
|
274
|
+
// Pub/Sub message.
|
|
275
|
+
message TextFormat {
|
|
276
|
+
// Optional. When unset, '\n' is used.
|
|
277
|
+
optional string delimiter = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// Configuration for reading Cloud Storage data in Avro binary format. The
|
|
281
|
+
// bytes of each object will be set to the `data` field of a Pub/Sub
|
|
282
|
+
// message.
|
|
283
|
+
message AvroFormat {}
|
|
284
|
+
|
|
285
|
+
// Configuration for reading Cloud Storage data written via [Cloud Storage
|
|
286
|
+
// subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage). The
|
|
287
|
+
// data and attributes fields of the originally exported Pub/Sub message
|
|
288
|
+
// will be restored when publishing.
|
|
289
|
+
message PubSubAvroFormat {}
|
|
290
|
+
|
|
291
|
+
// Output only. An output-only field that indicates the state of the Cloud
|
|
292
|
+
// Storage ingestion source.
|
|
293
|
+
State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
294
|
+
|
|
295
|
+
// Optional. Cloud Storage bucket. The bucket name must be without any
|
|
296
|
+
// prefix like "gs://". See the [bucket naming requirements]
|
|
297
|
+
// (https://cloud.google.com/storage/docs/buckets#naming).
|
|
298
|
+
string bucket = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
299
|
+
|
|
300
|
+
// Defaults to text format.
|
|
301
|
+
oneof input_format {
|
|
302
|
+
// Optional. Data from Cloud Storage will be interpreted as text.
|
|
303
|
+
TextFormat text_format = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
304
|
+
|
|
305
|
+
// Optional. Data from Cloud Storage will be interpreted in Avro format.
|
|
306
|
+
AvroFormat avro_format = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
307
|
+
|
|
308
|
+
// Optional. It will be assumed data from Cloud Storage was written via
|
|
309
|
+
// [Cloud Storage
|
|
310
|
+
// subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
|
|
311
|
+
PubSubAvroFormat pubsub_avro_format = 5
|
|
312
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// Optional. Only objects with a larger or equal creation timestamp will be
|
|
316
|
+
// ingested.
|
|
317
|
+
google.protobuf.Timestamp minimum_object_create_time = 6
|
|
318
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
319
|
+
|
|
320
|
+
// Optional. Glob pattern used to match objects that will be ingested. If
|
|
321
|
+
// unset, all objects will be ingested. See the [supported
|
|
322
|
+
// patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
|
|
323
|
+
string match_glob = 9 [(google.api.field_behavior) = OPTIONAL];
|
|
324
|
+
}
|
|
325
|
+
|
|
240
326
|
// Only one source type can have settings set.
|
|
241
327
|
oneof source {
|
|
242
328
|
// Optional. Amazon Kinesis Data Streams.
|
|
243
329
|
AwsKinesis aws_kinesis = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
330
|
+
|
|
331
|
+
// Optional. Cloud Storage.
|
|
332
|
+
CloudStorage cloud_storage = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// Optional. Platform Logs settings. If unset, no Platform Logs will be
|
|
336
|
+
// generated.
|
|
337
|
+
PlatformLogsSettings platform_logs_settings = 4
|
|
338
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// Settings for Platform Logs produced by Pub/Sub.
|
|
342
|
+
message PlatformLogsSettings {
|
|
343
|
+
// Severity levels of Platform Logs.
|
|
344
|
+
enum Severity {
|
|
345
|
+
// Default value. Logs level is unspecified. Logs will be disabled.
|
|
346
|
+
SEVERITY_UNSPECIFIED = 0;
|
|
347
|
+
|
|
348
|
+
// Logs will be disabled.
|
|
349
|
+
DISABLED = 1;
|
|
350
|
+
|
|
351
|
+
// Debug logs and higher-severity logs will be written.
|
|
352
|
+
DEBUG = 2;
|
|
353
|
+
|
|
354
|
+
// Info logs and higher-severity logs will be written.
|
|
355
|
+
INFO = 3;
|
|
356
|
+
|
|
357
|
+
// Warning logs and higher-severity logs will be written.
|
|
358
|
+
WARNING = 4;
|
|
359
|
+
|
|
360
|
+
// Only error logs will be written.
|
|
361
|
+
ERROR = 5;
|
|
244
362
|
}
|
|
363
|
+
|
|
364
|
+
// Optional. The minimum severity level of Platform Logs that will be written.
|
|
365
|
+
Severity severity = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
245
366
|
}
|
|
246
367
|
|
|
247
368
|
// A topic resource.
|
|
@@ -774,6 +895,20 @@ message Subscription {
|
|
|
774
895
|
RESOURCE_ERROR = 2;
|
|
775
896
|
}
|
|
776
897
|
|
|
898
|
+
// Information about an associated Analytics Hub subscription
|
|
899
|
+
// (https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).
|
|
900
|
+
message AnalyticsHubSubscriptionInfo {
|
|
901
|
+
// Optional. The name of the associated Analytics Hub listing resource.
|
|
902
|
+
// Pattern:
|
|
903
|
+
// "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}"
|
|
904
|
+
string listing = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
905
|
+
|
|
906
|
+
// Optional. The name of the associated Analytics Hub subscription resource.
|
|
907
|
+
// Pattern:
|
|
908
|
+
// "projects/{project}/locations/{location}/subscriptions/{subscription}"
|
|
909
|
+
string subscription = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
910
|
+
}
|
|
911
|
+
|
|
777
912
|
// Required. The name of the subscription. It must have the format
|
|
778
913
|
// `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
|
|
779
914
|
// start with a letter, and contain only letters (`[A-Za-z]`), numbers
|
|
@@ -837,7 +972,7 @@ message Subscription {
|
|
|
837
972
|
// backlog, from the moment a message is published. If `retain_acked_messages`
|
|
838
973
|
// is true, then this also configures the retention of acknowledged messages,
|
|
839
974
|
// and thus configures how far back in time a `Seek` can be done. Defaults to
|
|
840
|
-
// 7 days. Cannot be more than
|
|
975
|
+
// 7 days. Cannot be more than 31 days or less than 10 minutes.
|
|
841
976
|
google.protobuf.Duration message_retention_duration = 8
|
|
842
977
|
[(google.api.field_behavior) = OPTIONAL];
|
|
843
978
|
|
|
@@ -922,6 +1057,11 @@ message Subscription {
|
|
|
922
1057
|
// Output only. An output-only field indicating whether or not the
|
|
923
1058
|
// subscription can receive messages.
|
|
924
1059
|
State state = 19 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
1060
|
+
|
|
1061
|
+
// Output only. Information about the associated Analytics Hub subscription.
|
|
1062
|
+
// Only set if the subscritpion is created by Analytics Hub.
|
|
1063
|
+
AnalyticsHubSubscriptionInfo analytics_hub_subscription_info = 23
|
|
1064
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
925
1065
|
}
|
|
926
1066
|
|
|
927
1067
|
// A policy that specifies how Pub/Sub retries message delivery.
|