@google-cloud/pubsub 3.5.2 → 3.7.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 +14 -0
- package/build/protos/google/pubsub/v1/pubsub.proto +105 -7
- package/build/protos/google/pubsub/v1/schema.proto +1 -1
- package/build/protos/protos.d.ts +550 -0
- package/build/protos/protos.js +1638 -307
- package/build/protos/protos.json +100 -0
- package/build/src/publisher/index.js +2 -3
- package/build/src/publisher/index.js.map +1 -1
- package/build/src/publisher/message-queues.d.ts +8 -12
- package/build/src/publisher/message-queues.js +79 -62
- package/build/src/publisher/message-queues.js.map +1 -1
- package/build/src/v1/schema_service_client_config.json +23 -10
- package/build/src/v1/subscriber_client.d.ts +3 -0
- package/build/src/v1/subscriber_client.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/@google-cloud/pubsub?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [3.7.0](https://github.com/googleapis/nodejs-pubsub/compare/v3.6.0...v3.7.0) (2023-05-26)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Add push config wrapper fields ([#1730](https://github.com/googleapis/nodejs-pubsub/issues/1730)) ([a552719](https://github.com/googleapis/nodejs-pubsub/commit/a552719dfebda4c1263c352ea99bf8f9570290b7))
|
|
13
|
+
|
|
14
|
+
## [3.6.0](https://github.com/googleapis/nodejs-pubsub/compare/v3.5.2...v3.6.0) (2023-05-12)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* Add cloud storage subscription fields ([#1724](https://github.com/googleapis/nodejs-pubsub/issues/1724)) ([f61a64a](https://github.com/googleapis/nodejs-pubsub/commit/f61a64a2daffdfbf4c7b18d50434899c572d108c))
|
|
20
|
+
|
|
7
21
|
## [3.5.2](https://github.com/googleapis/nodejs-pubsub/compare/v3.5.1...v3.5.2) (2023-04-26)
|
|
8
22
|
|
|
9
23
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 Google LLC
|
|
2
2
|
//
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -647,9 +647,9 @@ service Subscriber {
|
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
649
|
|
|
650
|
-
// A subscription resource. If none of `push_config
|
|
651
|
-
// set, then the subscriber will pull and ack messages
|
|
652
|
-
// most one of these fields may be set.
|
|
650
|
+
// A subscription resource. If none of `push_config`, `bigquery_config`, or
|
|
651
|
+
// `cloud_storage_config` is set, then the subscriber will pull and ack messages
|
|
652
|
+
// using API methods. At most one of these fields may be set.
|
|
653
653
|
message Subscription {
|
|
654
654
|
option (google.api.resource) = {
|
|
655
655
|
type: "pubsub.googleapis.com/Subscription"
|
|
@@ -694,6 +694,10 @@ message Subscription {
|
|
|
694
694
|
// used to configure it.
|
|
695
695
|
BigQueryConfig bigquery_config = 18;
|
|
696
696
|
|
|
697
|
+
// If delivery to Google Cloud Storage is used with this subscription, this
|
|
698
|
+
// field is used to configure it.
|
|
699
|
+
CloudStorageConfig cloud_storage_config = 22;
|
|
700
|
+
|
|
697
701
|
// The approximate amount of time (on a best-effort basis) Pub/Sub waits for
|
|
698
702
|
// the subscriber to acknowledge receipt before resending the message. In the
|
|
699
703
|
// interval after the message is delivered and before it is acknowledged, it
|
|
@@ -885,9 +889,9 @@ message PushConfig {
|
|
|
885
889
|
message OidcToken {
|
|
886
890
|
// [Service account
|
|
887
891
|
// email](https://cloud.google.com/iam/docs/service-accounts)
|
|
888
|
-
//
|
|
889
|
-
//
|
|
890
|
-
//
|
|
892
|
+
// used for generating the OIDC token. For more information
|
|
893
|
+
// on setting up authentication, see
|
|
894
|
+
// [Push subscriptions](https://cloud.google.com/pubsub/docs/push).
|
|
891
895
|
string service_account_email = 1;
|
|
892
896
|
|
|
893
897
|
// Audience to be used when generating OIDC token. The audience claim
|
|
@@ -899,6 +903,19 @@ message PushConfig {
|
|
|
899
903
|
string audience = 2;
|
|
900
904
|
}
|
|
901
905
|
|
|
906
|
+
// The payload to the push endpoint is in the form of the JSON representation
|
|
907
|
+
// of a PubsubMessage
|
|
908
|
+
// (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).
|
|
909
|
+
message PubsubWrapper {}
|
|
910
|
+
|
|
911
|
+
// Sets the `data` field as the HTTP body for delivery.
|
|
912
|
+
message NoWrapper {
|
|
913
|
+
// When true, writes the Pub/Sub message metadata to
|
|
914
|
+
// `x-goog-pubsub-<KEY>:<VAL>` headers of the HTTP request. Writes the
|
|
915
|
+
// Pub/Sub message attributes to `<KEY>:<VAL>` headers of the HTTP request.
|
|
916
|
+
bool write_metadata = 1;
|
|
917
|
+
}
|
|
918
|
+
|
|
902
919
|
// A URL locating the endpoint to which messages should be pushed.
|
|
903
920
|
// For example, a Webhook endpoint might use `https://example.com/push`.
|
|
904
921
|
string push_endpoint = 1;
|
|
@@ -936,6 +953,18 @@ message PushConfig {
|
|
|
936
953
|
// `Authorization` header in the HTTP request for every pushed message.
|
|
937
954
|
OidcToken oidc_token = 3;
|
|
938
955
|
}
|
|
956
|
+
|
|
957
|
+
// The format of the delivered message to the push endpoint is defined by
|
|
958
|
+
// the chosen wrapper. When unset, `PubsubWrapper` is used.
|
|
959
|
+
oneof wrapper {
|
|
960
|
+
// When set, the payload to the push endpoint is in the form of the JSON
|
|
961
|
+
// representation of a PubsubMessage
|
|
962
|
+
// (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).
|
|
963
|
+
PubsubWrapper pubsub_wrapper = 4;
|
|
964
|
+
|
|
965
|
+
// When set, the payload to the push endpoint is not wrapped.
|
|
966
|
+
NoWrapper no_wrapper = 5;
|
|
967
|
+
}
|
|
939
968
|
}
|
|
940
969
|
|
|
941
970
|
// Configuration for a BigQuery subscription.
|
|
@@ -990,6 +1019,75 @@ message BigQueryConfig {
|
|
|
990
1019
|
State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
991
1020
|
}
|
|
992
1021
|
|
|
1022
|
+
// Configuration for a Cloud Storage subscription.
|
|
1023
|
+
message CloudStorageConfig {
|
|
1024
|
+
// Configuration for writing message data in text format.
|
|
1025
|
+
// Message payloads will be written to files as raw text, separated by a
|
|
1026
|
+
// newline.
|
|
1027
|
+
message TextConfig {}
|
|
1028
|
+
|
|
1029
|
+
// Configuration for writing message data in Avro format.
|
|
1030
|
+
// Message payloads and metadata will be written to files as an Avro binary.
|
|
1031
|
+
message AvroConfig {
|
|
1032
|
+
// When true, write the subscription name, message_id, publish_time,
|
|
1033
|
+
// attributes, and ordering_key as additional fields in the output.
|
|
1034
|
+
bool write_metadata = 1;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
// Possible states for a Cloud Storage subscription.
|
|
1038
|
+
enum State {
|
|
1039
|
+
// Default value. This value is unused.
|
|
1040
|
+
STATE_UNSPECIFIED = 0;
|
|
1041
|
+
|
|
1042
|
+
// The subscription can actively send messages to Cloud Storage.
|
|
1043
|
+
ACTIVE = 1;
|
|
1044
|
+
|
|
1045
|
+
// Cannot write to the Cloud Storage bucket because of permission denied
|
|
1046
|
+
// errors.
|
|
1047
|
+
PERMISSION_DENIED = 2;
|
|
1048
|
+
|
|
1049
|
+
// Cannot write to the Cloud Storage bucket because it does not exist.
|
|
1050
|
+
NOT_FOUND = 3;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
// Required. User-provided name for the Cloud Storage bucket.
|
|
1054
|
+
// The bucket must be created by the user. The bucket name must be without
|
|
1055
|
+
// any prefix like "gs://". See the [bucket naming
|
|
1056
|
+
// requirements] (https://cloud.google.com/storage/docs/buckets#naming).
|
|
1057
|
+
string bucket = 1 [(google.api.field_behavior) = REQUIRED];
|
|
1058
|
+
|
|
1059
|
+
// User-provided prefix for Cloud Storage filename. See the [object naming
|
|
1060
|
+
// requirements](https://cloud.google.com/storage/docs/objects#naming).
|
|
1061
|
+
string filename_prefix = 2;
|
|
1062
|
+
|
|
1063
|
+
// User-provided suffix for Cloud Storage filename. See the [object naming
|
|
1064
|
+
// requirements](https://cloud.google.com/storage/docs/objects#naming).
|
|
1065
|
+
string filename_suffix = 3;
|
|
1066
|
+
|
|
1067
|
+
// Defaults to text format.
|
|
1068
|
+
oneof output_format {
|
|
1069
|
+
// If set, message data will be written to Cloud Storage in text format.
|
|
1070
|
+
TextConfig text_config = 4;
|
|
1071
|
+
|
|
1072
|
+
// If set, message data will be written to Cloud Storage in Avro format.
|
|
1073
|
+
AvroConfig avro_config = 5;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
// The maximum duration that can elapse before a new Cloud Storage file is
|
|
1077
|
+
// created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
|
|
1078
|
+
// the subscription's acknowledgement deadline.
|
|
1079
|
+
google.protobuf.Duration max_duration = 6;
|
|
1080
|
+
|
|
1081
|
+
// The maximum bytes that can be written to a Cloud Storage file before a new
|
|
1082
|
+
// file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded
|
|
1083
|
+
// in cases where messages are larger than the limit.
|
|
1084
|
+
int64 max_bytes = 7;
|
|
1085
|
+
|
|
1086
|
+
// Output only. An output-only field that indicates whether or not the
|
|
1087
|
+
// subscription can receive messages.
|
|
1088
|
+
State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
1089
|
+
}
|
|
1090
|
+
|
|
993
1091
|
// A message and its corresponding acknowledgment ID.
|
|
994
1092
|
message ReceivedMessage {
|
|
995
1093
|
// This ID can be used to acknowledge the received message.
|