google-cloud-pubsub 2.15.2 → 2.15.4
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/AUTHENTICATION.md +8 -26
- data/CHANGELOG.md +12 -0
- data/lib/google/cloud/pubsub/subscriber/stream.rb +24 -6
- 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: 917128878f11c491c30e0e8b68a56b5a6da8ce423d6da5afeed1b78adba8e175
|
|
4
|
+
data.tar.gz: ecf1a403989e28f5984056230629d649aa2e6f9c7d37fa713f62a52a3d464064
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3a740219b3c2267802c22b2cc8b06be110006918e4ee4c48f06aeac368fb2a86c530cbd549dafb27e722a321fb5d2c87ca8b74921ef6a89c9bf7d084518fc3ae
|
|
7
|
+
data.tar.gz: ed5f36229f08a9395232f4770c78c3b9e5a0c6e77fdf0d324db83b636359e13b3e7eb16be71481de0feb4275f899da05c5fd78c3eb85a9d97c318c73c737affc
|
data/AUTHENTICATION.md
CHANGED
|
@@ -125,15 +125,6 @@ To configure your system for this, simply:
|
|
|
125
125
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
|
126
126
|
*should* only be used during development.
|
|
127
127
|
|
|
128
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
|
129
|
-
[dev-console]: https://console.cloud.google.com/project
|
|
130
|
-
|
|
131
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
|
132
|
-
|
|
133
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
|
134
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
|
135
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
|
136
|
-
|
|
137
128
|
## Creating a Service Account
|
|
138
129
|
|
|
139
130
|
Google Cloud requires a **Project ID** and **Service Account Credentials** to
|
|
@@ -144,31 +135,22 @@ If you are not running this client within [Google Cloud Platform
|
|
|
144
135
|
environments](#google-cloud-platform-environments), you need a Google
|
|
145
136
|
Developers service account.
|
|
146
137
|
|
|
147
|
-
1. Visit the [Google
|
|
138
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
|
148
139
|
1. Create a new project or click on an existing project.
|
|
149
|
-
1. Activate the
|
|
140
|
+
1. Activate the menu in the upper left and select **APIs & Services**. From
|
|
150
141
|
here, you will enable the APIs that your application requires.
|
|
151
142
|
|
|
152
|
-
![Enable the APIs that your application requires][enable-apis]
|
|
153
|
-
|
|
154
143
|
*Note: You may need to enable billing in order to use these services.*
|
|
155
144
|
|
|
156
145
|
1. Select **Credentials** from the side navigation.
|
|
157
146
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
![Create a new service account][create-new-service-account]
|
|
161
|
-
|
|
162
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
|
163
|
-
|
|
164
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
|
165
|
-
guided through downloading a new JSON key file.
|
|
166
|
-
|
|
167
|
-
If you want to re-use an existing service account, you can easily generate a
|
|
168
|
-
new key file. Just select the account you wish to re-use, and click "Generate
|
|
169
|
-
new JSON key":
|
|
147
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
|
148
|
+
"Service account" to be guided through downloading a new JSON key file.
|
|
170
149
|
|
|
171
|
-
|
|
150
|
+
If you want to re-use an existing service account, you can easily generate
|
|
151
|
+
a new key file. Just select the account you wish to re-use click the pencil
|
|
152
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
|
153
|
+
and then select **Add Key**.
|
|
172
154
|
|
|
173
155
|
The key file you download will be used by this library to authenticate API
|
|
174
156
|
requests and should be stored in a secure location.
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
### 2.15.4 (2023-05-18)
|
|
4
|
+
|
|
5
|
+
#### Documentation
|
|
6
|
+
|
|
7
|
+
* Fixed broken links in authentication documentation ([#21619](https://github.com/googleapis/google-cloud-ruby/issues/21619))
|
|
8
|
+
|
|
9
|
+
### 2.15.3 (2023-04-19)
|
|
10
|
+
|
|
11
|
+
#### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* wait for successful receipt modack when exactly once delivery enabled ([#21431](https://github.com/googleapis/google-cloud-ruby/issues/21431))
|
|
14
|
+
|
|
3
15
|
### 2.15.2 (2023-03-19)
|
|
4
16
|
|
|
5
17
|
#### Bug Fixes
|
|
@@ -248,6 +248,7 @@ module Google
|
|
|
248
248
|
# Cannot syncronize the enumerator, causes deadlock
|
|
249
249
|
response = enum.next
|
|
250
250
|
new_exactly_once_delivery_enabled = response&.subscription_properties&.exactly_once_delivery_enabled
|
|
251
|
+
received_messages = response.received_messages
|
|
251
252
|
|
|
252
253
|
# Use synchronize so changes happen atomically
|
|
253
254
|
synchronize do
|
|
@@ -256,17 +257,21 @@ module Google
|
|
|
256
257
|
@subscriber.exactly_once_delivery_enabled = @exactly_once_delivery_enabled
|
|
257
258
|
|
|
258
259
|
# Create receipt of received messages reception
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
260
|
+
if @exactly_once_delivery_enabled
|
|
261
|
+
create_receipt_modack_for_eos received_messages
|
|
262
|
+
else
|
|
263
|
+
@subscriber.buffer.modify_ack_deadline @subscriber.deadline, received_messages.map(&:ack_id)
|
|
264
|
+
# Add received messages to inventory
|
|
265
|
+
@inventory.add received_messages
|
|
266
|
+
end
|
|
263
267
|
end
|
|
264
268
|
|
|
265
|
-
|
|
269
|
+
received_messages.each do |rec_msg_grpc|
|
|
266
270
|
rec_msg = ReceivedMessage.from_grpc(rec_msg_grpc, self)
|
|
267
271
|
# No need to synchronize the callback future
|
|
268
272
|
register_callback rec_msg
|
|
269
|
-
end
|
|
273
|
+
end if !@exactly_once_delivery_enabled # Exactly once delivery scenario is handled by callback
|
|
274
|
+
|
|
270
275
|
synchronize { pause_streaming! }
|
|
271
276
|
rescue StopIteration
|
|
272
277
|
break
|
|
@@ -295,6 +300,19 @@ module Google
|
|
|
295
300
|
|
|
296
301
|
# rubocop:enable all
|
|
297
302
|
|
|
303
|
+
def create_receipt_modack_for_eos received_messages
|
|
304
|
+
received_messages.each do |rec_msg_grpc|
|
|
305
|
+
callback = proc do |result|
|
|
306
|
+
if result.succeeded?
|
|
307
|
+
synchronize { @inventory.add rec_msg_grpc }
|
|
308
|
+
rec_msg = ReceivedMessage.from_grpc rec_msg_grpc, self
|
|
309
|
+
register_callback rec_msg
|
|
310
|
+
end
|
|
311
|
+
end
|
|
312
|
+
@subscriber.buffer.modify_ack_deadline @subscriber.deadline, [rec_msg_grpc.ack_id], callback
|
|
313
|
+
end
|
|
314
|
+
end
|
|
315
|
+
|
|
298
316
|
# Updates min_duration_per_lease_extension to 60 when exactly_once_delivery_enabled
|
|
299
317
|
# and reverts back to default 0 when disabled.
|
|
300
318
|
# Skips if exactly_once_enabled is not modified.
|
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.15.
|
|
4
|
+
version: 2.15.4
|
|
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: 2023-
|
|
12
|
+
date: 2023-05-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: concurrent-ruby
|