google-cloud-pubsub 2.12.0 → 2.12.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afdce505d87a251a0408c830e80728cf68506cf5631013cfcdae0bc18dba549b
|
4
|
+
data.tar.gz: c46a1e91681598c21d1b4014b6fb0aadb7f8575c9c08e2c9a13ac8b91de87ed6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a31118080d4ad3a6a03b1911f6ec192dfe51021140bea354568c128856bd86cfbea79fd75d6fc6457a68e7266f018f9ef1e23868ee074576539f71916f8bc57
|
7
|
+
data.tar.gz: 4b9ff30c34dd3e08456dce04434e7e9da0552048dc86980d3b82f0af1114377601c7a96d71e1738973df0a506302dc5a7919ac900616b7b2fca58951891e5dfc
|
data/CHANGELOG.md
CHANGED
@@ -204,7 +204,12 @@ module Google
|
|
204
204
|
#
|
205
205
|
def acknowledge! &block
|
206
206
|
ensure_subscription!
|
207
|
-
subscription.
|
207
|
+
if subscription.respond_to?(:exactly_once_delivery_enabled) && subscription.exactly_once_delivery_enabled
|
208
|
+
subscription.acknowledge ack_id, &block
|
209
|
+
else
|
210
|
+
subscription.acknowledge ack_id
|
211
|
+
yield AcknowledgeResult.new(AcknowledgeResult::SUCCESS) if block_given?
|
212
|
+
end
|
208
213
|
end
|
209
214
|
alias ack! acknowledge!
|
210
215
|
|
@@ -265,7 +270,12 @@ module Google
|
|
265
270
|
#
|
266
271
|
def modify_ack_deadline! new_deadline, &block
|
267
272
|
ensure_subscription!
|
268
|
-
subscription.
|
273
|
+
if subscription.respond_to?(:exactly_once_delivery_enabled) && subscription.exactly_once_delivery_enabled
|
274
|
+
subscription.modify_ack_deadline new_deadline, ack_id, &block
|
275
|
+
else
|
276
|
+
subscription.modify_ack_deadline new_deadline, ack_id
|
277
|
+
yield AcknowledgeResult.new(AcknowledgeResult::SUCCESS) if block_given?
|
278
|
+
end
|
269
279
|
end
|
270
280
|
|
271
281
|
##
|
@@ -35,11 +35,11 @@ module Google
|
|
35
35
|
|
36
36
|
PERMANENT_FAILURE = "PERMANENT_FAILURE".freeze
|
37
37
|
# Google::Cloud::Unavailable error is already retried at gapic level
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
38
|
+
EXACTLY_ONCE_DELIVERY_POSSIBLE_RETRIABLE_ERRORS = [Google::Cloud::CanceledError,
|
39
|
+
Google::Cloud::DeadlineExceededError,
|
40
|
+
Google::Cloud::InternalError,
|
41
|
+
Google::Cloud::ResourceExhaustedError,
|
42
|
+
Google::Cloud::InvalidArgumentError].freeze
|
43
43
|
MAX_RETRY_DURATION = 600 # 600s since the server allows ack/modacks for 10 mins max
|
44
44
|
MAX_TRIES = 15
|
45
45
|
BASE_INTERVAL = 1
|
@@ -128,7 +128,7 @@ module Google
|
|
128
128
|
begin
|
129
129
|
@subscriber.service.acknowledge ack_req.subscription, *ack_req.ack_ids
|
130
130
|
handle_callback AcknowledgeResult.new(AcknowledgeResult::SUCCESS), ack_req.ack_ids
|
131
|
-
rescue *
|
131
|
+
rescue *EXACTLY_ONCE_DELIVERY_POSSIBLE_RETRIABLE_ERRORS => e
|
132
132
|
handle_failure e, ack_req.ack_ids if @subscriber.exactly_once_delivery_enabled
|
133
133
|
rescue StandardError => e
|
134
134
|
handle_callback construct_result(e), ack_req.ack_ids
|
@@ -146,7 +146,7 @@ module Google
|
|
146
146
|
handle_callback AcknowledgeResult.new(AcknowledgeResult::SUCCESS),
|
147
147
|
mod_ack_req.ack_ids,
|
148
148
|
modack: true
|
149
|
-
rescue *
|
149
|
+
rescue *EXACTLY_ONCE_DELIVERY_POSSIBLE_RETRIABLE_ERRORS => e
|
150
150
|
if @subscriber.exactly_once_delivery_enabled
|
151
151
|
handle_failure e, mod_ack_req.ack_ids, mod_ack_req.ack_deadline_seconds
|
152
152
|
end
|
@@ -276,7 +276,7 @@ module Google
|
|
276
276
|
max_interval: MAX_INTERVAL,
|
277
277
|
multiplier: MULTIPLIER,
|
278
278
|
max_elapsed_time: MAX_RETRY_DURATION,
|
279
|
-
on:
|
279
|
+
on: EXACTLY_ONCE_DELIVERY_POSSIBLE_RETRIABLE_ERRORS do
|
280
280
|
return if ack_ids.nil?
|
281
281
|
begin
|
282
282
|
yield ack_ids
|
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.12.
|
4
|
+
version: 2.12.1
|
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: 2022-08-
|
12
|
+
date: 2022-08-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: concurrent-ruby
|