google-cloud-pubsub 2.2.0 → 2.3.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/google/cloud/pubsub/retry_policy.rb +0 -3
- data/lib/google/cloud/pubsub/subscriber.rb +14 -1
- data/lib/google/cloud/pubsub/subscriber/inventory.rb +5 -2
- data/lib/google/cloud/pubsub/subscriber/stream.rb +2 -2
- data/lib/google/cloud/pubsub/subscription.rb +3 -6
- data/lib/google/cloud/pubsub/topic.rb +0 -3
- data/lib/google/cloud/pubsub/version.rb +1 -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: 355d1480255766f32036dedb71834ec3cf28f8e0966bb95b9017e056633954fa
|
4
|
+
data.tar.gz: c3a3583e51f3a3b066c168650677ad9c7efe598a39ea987fa8d5559f9c7d26d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ece0f850c4b9e019104e6224c6918c888e999b70860fffd0cb7e57b4a3dd9678a4d2ba9497217aa779e69421cb50706287517c7a5ed294204cbafe954677b5d
|
7
|
+
data.tar.gz: df5687af6d2805c0e48ac4bc13536af942efd6022c55a6027cd39824d750929c9746732d03c59dd59001d9954af631b3813c6d9e3a07c2f49f46ab4042dbaa14
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 2.3.0 / 2020-11-18
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* Add inventory.use_legacy_flow_control to listen options
|
8
|
+
* Add inventory.use_legacy_flow_control to Subscription#listen options
|
9
|
+
* Add Subscriber#use_legacy_flow_control?
|
10
|
+
|
11
|
+
#### Documentation
|
12
|
+
|
13
|
+
* Remove EXPERIMENTAL label from RetryPolicy docs
|
14
|
+
|
3
15
|
### 2.2.0 / 2020-11-11
|
4
16
|
|
5
17
|
#### Features
|
@@ -31,9 +31,6 @@ module Google
|
|
31
31
|
# Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not
|
32
32
|
# match the configuration. That is, delay can be more or less than configured backoff.
|
33
33
|
#
|
34
|
-
# **EXPERIMENTAL:** This API might be changed in backward-incompatible ways and is not recommended for production
|
35
|
-
# use. It is not subject to any SLA or deprecation policy.
|
36
|
-
#
|
37
34
|
# @attr [Numeric] minimum_backoff The minimum delay between consecutive deliveries of a given message. Value
|
38
35
|
# should be between 0 and 600 seconds. The default value is 10 seconds.
|
39
36
|
# @attr [Numeric] maximum_backoff The maximum delay between consecutive deliveries of a given message. Value
|
@@ -306,6 +306,17 @@ module Google
|
|
306
306
|
# @deprecated Use {#max_outstanding_bytes}.
|
307
307
|
alias inventory_bytesize max_outstanding_bytes
|
308
308
|
|
309
|
+
##
|
310
|
+
# Whether to enforce flow control at the client side only or to enforce it at both the client and
|
311
|
+
# the server. For more details about flow control see https://cloud.google.com/pubsub/docs/pull#config.
|
312
|
+
#
|
313
|
+
# @return [Boolean] `true` when only client side flow control is enforced, `false` when both client and
|
314
|
+
# server side flow control are enforced.
|
315
|
+
#
|
316
|
+
def use_legacy_flow_control?
|
317
|
+
@inventory[:use_legacy_flow_control]
|
318
|
+
end
|
319
|
+
|
309
320
|
##
|
310
321
|
# The number of seconds that received messages can be held awaiting processing. Default is 3,600 (1 hour).
|
311
322
|
#
|
@@ -334,7 +345,8 @@ module Google
|
|
334
345
|
limit: @inventory[:max_outstanding_messages].fdiv(@streams).ceil,
|
335
346
|
bytesize: @inventory[:max_outstanding_bytes].fdiv(@streams).ceil,
|
336
347
|
extension: @inventory[:max_total_lease_duration],
|
337
|
-
max_duration_per_lease_extension: @inventory[:max_duration_per_lease_extension]
|
348
|
+
max_duration_per_lease_extension: @inventory[:max_duration_per_lease_extension],
|
349
|
+
use_legacy_flow_control: @inventory[:use_legacy_flow_control]
|
338
350
|
}
|
339
351
|
end
|
340
352
|
|
@@ -377,6 +389,7 @@ module Google
|
|
377
389
|
@inventory[:max_outstanding_bytes] = Integer(@inventory[:max_outstanding_bytes] || 100_000_000)
|
378
390
|
@inventory[:max_total_lease_duration] = Integer(@inventory[:max_total_lease_duration] || 3600)
|
379
391
|
@inventory[:max_duration_per_lease_extension] = Integer(@inventory[:max_duration_per_lease_extension] || 0)
|
392
|
+
@inventory[:use_legacy_flow_control] = @inventory[:use_legacy_flow_control] || false
|
380
393
|
end
|
381
394
|
|
382
395
|
def default_error_callbacks
|
@@ -30,15 +30,18 @@ module Google
|
|
30
30
|
|
31
31
|
include MonitorMixin
|
32
32
|
|
33
|
-
attr_reader :stream, :limit, :bytesize, :extension, :max_duration_per_lease_extension
|
33
|
+
attr_reader :stream, :limit, :bytesize, :extension, :max_duration_per_lease_extension,
|
34
|
+
:use_legacy_flow_control
|
34
35
|
|
35
|
-
def initialize stream, limit:, bytesize:, extension:, max_duration_per_lease_extension
|
36
|
+
def initialize stream, limit:, bytesize:, extension:, max_duration_per_lease_extension:,
|
37
|
+
use_legacy_flow_control:
|
36
38
|
super()
|
37
39
|
@stream = stream
|
38
40
|
@limit = limit
|
39
41
|
@bytesize = bytesize
|
40
42
|
@extension = extension
|
41
43
|
@max_duration_per_lease_extension = max_duration_per_lease_extension
|
44
|
+
@use_legacy_flow_control = use_legacy_flow_control
|
42
45
|
@inventory = {}
|
43
46
|
@wait_cond = new_cond
|
44
47
|
end
|
@@ -363,8 +363,8 @@ module Google
|
|
363
363
|
req.modify_deadline_ack_ids += @inventory.ack_ids
|
364
364
|
req.modify_deadline_seconds += @inventory.ack_ids.map { @subscriber.deadline }
|
365
365
|
req.client_id = @subscriber.service.client_id
|
366
|
-
req.max_outstanding_messages = @inventory.limit
|
367
|
-
req.max_outstanding_bytes = @inventory.bytesize
|
366
|
+
req.max_outstanding_messages = @inventory.use_legacy_flow_control ? 0 : @inventory.limit
|
367
|
+
req.max_outstanding_bytes = @inventory.use_legacy_flow_control ? 0 : @inventory.bytesize
|
368
368
|
end
|
369
369
|
end
|
370
370
|
|
@@ -547,9 +547,6 @@ module Google
|
|
547
547
|
# for healthy subscribers. Retry Policy will be triggered on NACKs or acknowledgement deadline exceeded events
|
548
548
|
# for a given message.
|
549
549
|
#
|
550
|
-
# **EXPERIMENTAL:** This API might be changed in backward-incompatible ways and is not recommended for
|
551
|
-
# production use. It is not subject to any SLA or deprecation policy.
|
552
|
-
#
|
553
550
|
# @return [RetryPolicy, nil] The retry policy for the subscription, or `nil`.
|
554
551
|
#
|
555
552
|
# @example
|
@@ -576,9 +573,6 @@ module Google
|
|
576
573
|
# for healthy subscribers. Retry Policy will be triggered on NACKs or acknowledgement deadline exceeded events
|
577
574
|
# for a given message.
|
578
575
|
#
|
579
|
-
# **EXPERIMENTAL:** This API might be changed in backward-incompatible ways and is not recommended for
|
580
|
-
# production use. It is not subject to any SLA or deprecation policy.
|
581
|
-
#
|
582
576
|
# @param [RetryPolicy, nil] new_retry_policy A new retry policy for the subscription, or `nil`.
|
583
577
|
#
|
584
578
|
# @example
|
@@ -870,6 +864,9 @@ module Google
|
|
870
864
|
# Default is 1,000. (Note: replaces `:limit`, which is deprecated.)
|
871
865
|
# * `:max_outstanding_bytes` [Integer] The total byte size of received messages to be collected by
|
872
866
|
# subscriber. Default is 100,000,000 (100MB). (Note: replaces `:bytesize`, which is deprecated.)
|
867
|
+
# * `:use_legacy_flow_control` [Boolean] Disables enforcing flow control settings at the Cloud PubSub
|
868
|
+
# server and the less accurate method of only enforcing flow control at the client side is used instead.
|
869
|
+
# Default is false.
|
873
870
|
# * `:max_total_lease_duration` [Integer] The number of seconds that received messages can be held awaiting
|
874
871
|
# processing. Default is 3,600 (1 hour). (Note: replaces `:extension`, which is deprecated.)
|
875
872
|
# * `:max_duration_per_lease_extension` [Integer] The maximum amount of time in seconds for a single lease
|
@@ -309,9 +309,6 @@ module Google
|
|
309
309
|
# will be retried as soon as possible for healthy subscribers. Retry Policy will be triggered on NACKs or
|
310
310
|
# acknowledgement deadline exceeded events for a given message.
|
311
311
|
#
|
312
|
-
# **EXPERIMENTAL:** This API might be changed in backward-incompatible ways and is not recommended for
|
313
|
-
# production use. It is not subject to any SLA or deprecation policy.
|
314
|
-
#
|
315
312
|
# @return [Google::Cloud::PubSub::Subscription]
|
316
313
|
#
|
317
314
|
# @example
|
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: 2.
|
4
|
+
version: 2.3.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: 2020-11-
|
12
|
+
date: 2020-11-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: concurrent-ruby
|