google-cloud-pubsub 0.38.1 → 0.39.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb +63 -23
- data/lib/google/cloud/pubsub/v1/publisher_client.rb +3 -9
- data/lib/google/cloud/pubsub/v1/subscriber_client.rb +20 -3
- data/lib/google/cloud/pubsub/version.rb +1 -1
- data/lib/google/pubsub/v1/pubsub_pb.rb +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0fd7553d4bbada28a7a6f4059d46e4251e822133d17cb083a04b227baf644f8
|
4
|
+
data.tar.gz: 5533102d2f2f9ed27165c194a611d80dfa33c434cdeb28b99a07aaeb715a3e23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce65f101dc44c8d4abb96a5c3762f55935d1bf47ad0171309f7109b66c4367e466eb0fbb7ef1341202520a1b7723b327a3764476d495976d6a644ad714679482
|
7
|
+
data.tar.gz: 40c1f20213de5af4108305b8cbdb6849bdeb3101f2cfad12a595ef9daae1297b529d318bf0bb3c7f2e898705b59c663374857fde9902e9558cd23d3b17611fc5
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 0.39.0 / 2019-08-23
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* Add Dead Letter Policy to low-level API
|
8
|
+
* Add Google::Cloud::PubSub::V1::Subscription#dead_letter_policy
|
9
|
+
* Add Google::Cloud::PubSub::V1::DeadLetterPolicy class
|
10
|
+
|
11
|
+
#### Documentation
|
12
|
+
|
13
|
+
* Update documentation
|
14
|
+
|
3
15
|
### 0.38.1 / 2019-08-02
|
4
16
|
|
5
17
|
* Add endpoint argument to constructor
|
@@ -19,12 +19,11 @@ module Google
|
|
19
19
|
module V1
|
20
20
|
# @!attribute [rw] allowed_persistence_regions
|
21
21
|
# @return [Array<String>]
|
22
|
-
#
|
22
|
+
# A list of IDs of GCP regions where messages that are published to the topic
|
23
23
|
# may be persisted in storage. Messages published by publishers running in
|
24
24
|
# non-allowed GCP regions (or running outside of GCP altogether) will be
|
25
|
-
# routed for storage in one of the allowed regions. An empty list
|
26
|
-
#
|
27
|
-
# all Publish operations failing.
|
25
|
+
# routed for storage in one of the allowed regions. An empty list means that
|
26
|
+
# no regions are allowed, and is not a valid configuration.
|
28
27
|
class MessageStoragePolicy; end
|
29
28
|
|
30
29
|
# A topic resource.
|
@@ -42,21 +41,15 @@ module Google
|
|
42
41
|
# managing labels</a>.
|
43
42
|
# @!attribute [rw] message_storage_policy
|
44
43
|
# @return [Google::Cloud::PubSub::V1::MessageStoragePolicy]
|
45
|
-
# Policy constraining
|
46
|
-
#
|
47
|
-
#
|
48
|
-
# CreateTopic or to UpdateTopic. This field will be populated in the
|
49
|
-
# responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
|
50
|
-
# response, then no constraints are in effect.
|
44
|
+
# Policy constraining the set of Google Cloud Platform regions where messages
|
45
|
+
# published to the topic may be stored. If not present, then no constraints
|
46
|
+
# are in effect.
|
51
47
|
# @!attribute [rw] kms_key_name
|
52
48
|
# @return [String]
|
53
49
|
# The resource name of the Cloud KMS CryptoKey to be used to protect access
|
54
50
|
# to messages published on this topic.
|
55
51
|
#
|
56
52
|
# The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
|
57
|
-
# <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
|
58
|
-
# API might be changed in backward-incompatible ways and is not recommended
|
59
|
-
# for production use. It is not subject to any SLA or deprecation policy.
|
60
53
|
class Topic; end
|
61
54
|
|
62
55
|
# A message that is published by publishers and consumed by subscribers. The
|
@@ -298,8 +291,54 @@ module Google
|
|
298
291
|
# operations on the subscription. If `expiration_policy` is not set, a
|
299
292
|
# *default policy* with `ttl` of 31 days will be used. The minimum allowed
|
300
293
|
# value for `expiration_policy.ttl` is 1 day.
|
294
|
+
# @!attribute [rw] dead_letter_policy
|
295
|
+
# @return [Google::Cloud::PubSub::V1::DeadLetterPolicy]
|
296
|
+
# A policy that specifies the conditions for dead lettering messages in
|
297
|
+
# this subscription. If dead_letter_policy is not set, dead lettering
|
298
|
+
# is disabled.
|
299
|
+
#
|
300
|
+
# The Cloud Pub/Sub service account associated with this subscriptions's
|
301
|
+
# parent project (i.e.,
|
302
|
+
# service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
|
303
|
+
# permission to Acknowledge() messages on this subscription.
|
304
|
+
# <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
|
305
|
+
# API might be changed in backward-incompatible ways and is not recommended
|
306
|
+
# for production use. It is not subject to any SLA or deprecation policy.
|
301
307
|
class Subscription; end
|
302
308
|
|
309
|
+
# Dead lettering is done on a best effort basis. The same message might be
|
310
|
+
# dead lettered multiple times.
|
311
|
+
#
|
312
|
+
# If validation on any of the fields fails at subscription creation/updation,
|
313
|
+
# the create/update subscription request will fail.
|
314
|
+
# @!attribute [rw] dead_letter_topic
|
315
|
+
# @return [String]
|
316
|
+
# The name of the topic to which dead letter messages should be published.
|
317
|
+
# Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
|
318
|
+
# account associated with the enclosing subscription's parent project (i.e.,
|
319
|
+
# service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
|
320
|
+
# permission to Publish() to this topic.
|
321
|
+
#
|
322
|
+
# The operation will fail if the topic does not exist.
|
323
|
+
# Users should ensure that there is a subscription attached to this topic
|
324
|
+
# since messages published to a topic with no subscriptions are lost.
|
325
|
+
# @!attribute [rw] max_delivery_attempts
|
326
|
+
# @return [Integer]
|
327
|
+
# The maximum number of delivery attempts for any message. The value must be
|
328
|
+
# between 5 and 100.
|
329
|
+
#
|
330
|
+
# The number of delivery attempts is defined as 1 + (the sum of number of
|
331
|
+
# NACKs and number of times the acknowledgement deadline has been exceeded
|
332
|
+
# for the message).
|
333
|
+
#
|
334
|
+
# A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that
|
335
|
+
# client libraries may automatically extend ack_deadlines.
|
336
|
+
#
|
337
|
+
# This field will be honored on a best effort basis.
|
338
|
+
#
|
339
|
+
# If this parameter is 0, a default value of 5 is used.
|
340
|
+
class DeadLetterPolicy; end
|
341
|
+
|
303
342
|
# A policy that specifies the conditions for resource expiration (i.e.,
|
304
343
|
# automatic resource deletion).
|
305
344
|
# @!attribute [rw] ttl
|
@@ -319,27 +358,27 @@ module Google
|
|
319
358
|
# For example, a Webhook endpoint might use "https://example.com/push".
|
320
359
|
# @!attribute [rw] attributes
|
321
360
|
# @return [Hash{String => String}]
|
322
|
-
# Endpoint configuration attributes
|
361
|
+
# Endpoint configuration attributes that can be used to control different
|
362
|
+
# aspects of the message delivery.
|
323
363
|
#
|
324
|
-
#
|
325
|
-
# control different aspects of the message delivery.
|
326
|
-
#
|
327
|
-
# The currently supported attribute is `x-goog-version`, which you can
|
364
|
+
# The only currently supported attribute is `x-goog-version`, which you can
|
328
365
|
# use to change the format of the pushed message. This attribute
|
329
366
|
# indicates the version of the data expected by the endpoint. This
|
330
367
|
# controls the shape of the pushed message (i.e., its fields and metadata).
|
331
|
-
# The endpoint version is based on the version of the Pub/Sub API.
|
332
368
|
#
|
333
369
|
# If not present during the `CreateSubscription` call, it will default to
|
334
|
-
# the version of the API used to make such call. If not present
|
370
|
+
# the version of the Pub/Sub API used to make such call. If not present in a
|
335
371
|
# `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
|
336
372
|
# calls will always return a valid version, even if the subscription was
|
337
373
|
# created without this attribute.
|
338
374
|
#
|
339
|
-
# The
|
375
|
+
# The only supported values for the `x-goog-version` attribute are:
|
340
376
|
#
|
341
377
|
# * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
|
342
378
|
# * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
|
379
|
+
#
|
380
|
+
# For example:
|
381
|
+
# <pre><code>attributes { "x-goog-version": "v1" } </code></pre>
|
343
382
|
# @!attribute [rw] oidc_token
|
344
383
|
# @return [Google::Cloud::PubSub::V1::PushConfig::OidcToken]
|
345
384
|
# If specified, Pub/Sub will generate and attach an OIDC JWT token as an
|
@@ -453,8 +492,9 @@ module Google
|
|
453
492
|
# least one message is available, rather than returning no messages.
|
454
493
|
# @!attribute [rw] max_messages
|
455
494
|
# @return [Integer]
|
456
|
-
# The maximum number of messages
|
457
|
-
# system may return fewer than the number
|
495
|
+
# The maximum number of messages to return for this request. Must be a
|
496
|
+
# positive integer. The Pub/Sub system may return fewer than the number
|
497
|
+
# specified.
|
458
498
|
class PullRequest; end
|
459
499
|
|
460
500
|
# Response for the `Pull` method.
|
@@ -340,12 +340,9 @@ module Google
|
|
340
340
|
# See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
|
341
341
|
# managing labels</a>.
|
342
342
|
# @param message_storage_policy [Google::Cloud::PubSub::V1::MessageStoragePolicy | Hash]
|
343
|
-
# Policy constraining
|
344
|
-
#
|
345
|
-
#
|
346
|
-
# CreateTopic or to UpdateTopic. This field will be populated in the
|
347
|
-
# responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
|
348
|
-
# response, then no constraints are in effect.
|
343
|
+
# Policy constraining the set of Google Cloud Platform regions where messages
|
344
|
+
# published to the topic may be stored. If not present, then no constraints
|
345
|
+
# are in effect.
|
349
346
|
# A hash of the same form as `Google::Cloud::PubSub::V1::MessageStoragePolicy`
|
350
347
|
# can also be provided.
|
351
348
|
# @param kms_key_name [String]
|
@@ -353,9 +350,6 @@ module Google
|
|
353
350
|
# to messages published on this topic.
|
354
351
|
#
|
355
352
|
# The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
|
356
|
-
# <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
|
357
|
-
# API might be changed in backward-incompatible ways and is not recommended
|
358
|
-
# for production use. It is not subject to any SLA or deprecation policy.
|
359
353
|
# @param options [Google::Gax::CallOptions]
|
360
354
|
# Overrides the default settings for this call, e.g, timeout,
|
361
355
|
# retries, etc.
|
@@ -499,6 +499,20 @@ module Google
|
|
499
499
|
# value for `expiration_policy.ttl` is 1 day.
|
500
500
|
# A hash of the same form as `Google::Cloud::PubSub::V1::ExpirationPolicy`
|
501
501
|
# can also be provided.
|
502
|
+
# @param dead_letter_policy [Google::Cloud::PubSub::V1::DeadLetterPolicy | Hash]
|
503
|
+
# A policy that specifies the conditions for dead lettering messages in
|
504
|
+
# this subscription. If dead_letter_policy is not set, dead lettering
|
505
|
+
# is disabled.
|
506
|
+
#
|
507
|
+
# The Cloud Pub/Sub service account associated with this subscriptions's
|
508
|
+
# parent project (i.e.,
|
509
|
+
# service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
|
510
|
+
# permission to Acknowledge() messages on this subscription.
|
511
|
+
# <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
|
512
|
+
# API might be changed in backward-incompatible ways and is not recommended
|
513
|
+
# for production use. It is not subject to any SLA or deprecation policy.
|
514
|
+
# A hash of the same form as `Google::Cloud::PubSub::V1::DeadLetterPolicy`
|
515
|
+
# can also be provided.
|
502
516
|
# @param options [Google::Gax::CallOptions]
|
503
517
|
# Overrides the default settings for this call, e.g, timeout,
|
504
518
|
# retries, etc.
|
@@ -525,6 +539,7 @@ module Google
|
|
525
539
|
labels: nil,
|
526
540
|
enable_message_ordering: nil,
|
527
541
|
expiration_policy: nil,
|
542
|
+
dead_letter_policy: nil,
|
528
543
|
options: nil,
|
529
544
|
&block
|
530
545
|
req = {
|
@@ -536,7 +551,8 @@ module Google
|
|
536
551
|
message_retention_duration: message_retention_duration,
|
537
552
|
labels: labels,
|
538
553
|
enable_message_ordering: enable_message_ordering,
|
539
|
-
expiration_policy: expiration_policy
|
554
|
+
expiration_policy: expiration_policy,
|
555
|
+
dead_letter_policy: dead_letter_policy
|
540
556
|
}.delete_if { |_, v| v.nil? }
|
541
557
|
req = Google::Gax::to_proto(req, Google::Cloud::PubSub::V1::Subscription)
|
542
558
|
@create_subscription.call(req, options, &block)
|
@@ -816,8 +832,9 @@ module Google
|
|
816
832
|
# The subscription from which messages should be pulled.
|
817
833
|
# Format is `projects/{project}/subscriptions/{sub}`.
|
818
834
|
# @param max_messages [Integer]
|
819
|
-
# The maximum number of messages
|
820
|
-
# system may return fewer than the number
|
835
|
+
# The maximum number of messages to return for this request. Must be a
|
836
|
+
# positive integer. The Pub/Sub system may return fewer than the number
|
837
|
+
# specified.
|
821
838
|
# @param return_immediately [true, false]
|
822
839
|
# If this field set to true, the system will respond immediately even if
|
823
840
|
# it there are no messages available to return in the `Pull` response.
|
@@ -5,7 +5,7 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
require 'google/api/annotations_pb'
|
8
|
-
require 'google/api/
|
8
|
+
require 'google/api/client_pb'
|
9
9
|
require 'google/protobuf/duration_pb'
|
10
10
|
require 'google/protobuf/empty_pb'
|
11
11
|
require 'google/protobuf/field_mask_pb'
|
@@ -81,6 +81,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
81
81
|
map :labels, :string, :string, 9
|
82
82
|
optional :enable_message_ordering, :bool, 10
|
83
83
|
optional :expiration_policy, :message, 11, "google.pubsub.v1.ExpirationPolicy"
|
84
|
+
optional :dead_letter_policy, :message, 13, "google.pubsub.v1.DeadLetterPolicy"
|
85
|
+
end
|
86
|
+
add_message "google.pubsub.v1.DeadLetterPolicy" do
|
87
|
+
optional :dead_letter_topic, :string, 1
|
88
|
+
optional :max_delivery_attempts, :int32, 2
|
84
89
|
end
|
85
90
|
add_message "google.pubsub.v1.ExpirationPolicy" do
|
86
91
|
optional :ttl, :message, 1, "google.protobuf.Duration"
|
@@ -214,6 +219,7 @@ module Google::Cloud::PubSub::V1
|
|
214
219
|
ListTopicSnapshotsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSnapshotsResponse").msgclass
|
215
220
|
DeleteTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteTopicRequest").msgclass
|
216
221
|
Subscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Subscription").msgclass
|
222
|
+
DeadLetterPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeadLetterPolicy").msgclass
|
217
223
|
ExpirationPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ExpirationPolicy").msgclass
|
218
224
|
PushConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig").msgclass
|
219
225
|
PushConfig::OidcToken = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig.OidcToken").msgclass
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-pubsub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.39.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-08-
|
12
|
+
date: 2019-08-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|