google-cloud-pubsub 1.9.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.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +18 -0
  3. data/AUTHENTICATION.md +177 -0
  4. data/CHANGELOG.md +538 -0
  5. data/CODE_OF_CONDUCT.md +40 -0
  6. data/CONTRIBUTING.md +188 -0
  7. data/EMULATOR.md +37 -0
  8. data/LICENSE +201 -0
  9. data/LOGGING.md +32 -0
  10. data/OVERVIEW.md +557 -0
  11. data/TROUBLESHOOTING.md +31 -0
  12. data/lib/google-cloud-pubsub.rb +139 -0
  13. data/lib/google/cloud/pubsub.rb +173 -0
  14. data/lib/google/cloud/pubsub/async_publisher.rb +399 -0
  15. data/lib/google/cloud/pubsub/async_publisher/batch.rb +309 -0
  16. data/lib/google/cloud/pubsub/batch_publisher.rb +99 -0
  17. data/lib/google/cloud/pubsub/convert.rb +91 -0
  18. data/lib/google/cloud/pubsub/credentials.rb +47 -0
  19. data/lib/google/cloud/pubsub/errors.rb +85 -0
  20. data/lib/google/cloud/pubsub/message.rb +158 -0
  21. data/lib/google/cloud/pubsub/policy.rb +187 -0
  22. data/lib/google/cloud/pubsub/project.rb +393 -0
  23. data/lib/google/cloud/pubsub/publish_result.rb +103 -0
  24. data/lib/google/cloud/pubsub/received_message.rb +297 -0
  25. data/lib/google/cloud/pubsub/retry_policy.rb +90 -0
  26. data/lib/google/cloud/pubsub/service.rb +514 -0
  27. data/lib/google/cloud/pubsub/snapshot.rb +202 -0
  28. data/lib/google/cloud/pubsub/snapshot/list.rb +178 -0
  29. data/lib/google/cloud/pubsub/subscriber.rb +399 -0
  30. data/lib/google/cloud/pubsub/subscriber/enumerator_queue.rb +54 -0
  31. data/lib/google/cloud/pubsub/subscriber/inventory.rb +166 -0
  32. data/lib/google/cloud/pubsub/subscriber/sequencer.rb +115 -0
  33. data/lib/google/cloud/pubsub/subscriber/stream.rb +401 -0
  34. data/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb +231 -0
  35. data/lib/google/cloud/pubsub/subscription.rb +1279 -0
  36. data/lib/google/cloud/pubsub/subscription/list.rb +205 -0
  37. data/lib/google/cloud/pubsub/subscription/push_config.rb +244 -0
  38. data/lib/google/cloud/pubsub/topic.rb +934 -0
  39. data/lib/google/cloud/pubsub/topic/list.rb +171 -0
  40. data/lib/google/cloud/pubsub/v1.rb +17 -0
  41. data/lib/google/cloud/pubsub/v1/credentials.rb +41 -0
  42. data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/iam_policy.rb +21 -0
  43. data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/options.rb +21 -0
  44. data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/policy.rb +21 -0
  45. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/duration.rb +91 -0
  46. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/empty.rb +29 -0
  47. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/field_mask.rb +222 -0
  48. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/timestamp.rb +113 -0
  49. data/lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb +833 -0
  50. data/lib/google/cloud/pubsub/v1/doc/google/type/expr.rb +19 -0
  51. data/lib/google/cloud/pubsub/v1/publisher_client.rb +928 -0
  52. data/lib/google/cloud/pubsub/v1/publisher_client_config.json +120 -0
  53. data/lib/google/cloud/pubsub/v1/subscriber_client.rb +1466 -0
  54. data/lib/google/cloud/pubsub/v1/subscriber_client_config.json +153 -0
  55. data/lib/google/cloud/pubsub/version.rb +24 -0
  56. data/lib/google/pubsub/v1/pubsub_pb.rb +269 -0
  57. data/lib/google/pubsub/v1/pubsub_services_pb.rb +215 -0
  58. metadata +337 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: dfbd62e0e48c406ed08325e5a216f03a0afc4f8319c5ef144fbb6b1fa189e16c
4
+ data.tar.gz: 31995baf9d81c17e1c867efb5584da5d0be27e1baa3bfa256311e803d43cbfb9
5
+ SHA512:
6
+ metadata.gz: 8d50149459ec7bc696a15785ae7f0d77777d9f95edefb4da0775f9e005c25cd8cfe17d20899649fb17c6fc928eb9e0bbc0baddce26afc773d300c54728b04bd6
7
+ data.tar.gz: b599664094c01fc88030478e9076ad72a73ceb6bb3aa4b3a64240193694f0d47f6a34bbbd2ab8ce1188c45d6bbd6322d91e91f157362de0a8a6307c002e6084a
@@ -0,0 +1,18 @@
1
+ --no-private
2
+ --title=Google Cloud Pub/Sub
3
+ --exclude _pb\.rb$
4
+ --markup markdown
5
+ --markup-provider redcarpet
6
+ --main OVERVIEW.md
7
+
8
+ ./lib/**/*.rb
9
+ -
10
+ OVERVIEW.md
11
+ AUTHENTICATION.md
12
+ EMULATOR.md
13
+ LOGGING.md
14
+ CONTRIBUTING.md
15
+ TROUBLESHOOTING.md
16
+ CHANGELOG.md
17
+ CODE_OF_CONDUCT.md
18
+ LICENSE
@@ -0,0 +1,177 @@
1
+ # Authentication
2
+
3
+ In general, the google-cloud-pubsub library uses [Service
4
+ Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
5
+ credentials to connect to Google Cloud services. When running within [Google
6
+ Cloud Platform environments](#google-cloud-platform-environments)
7
+ the credentials will be discovered automatically. When running on other
8
+ environments, the Service Account credentials can be specified by providing the
9
+ path to the [JSON
10
+ keyfile](https://cloud.google.com/iam/docs/managing-service-account-keys) for
11
+ the account (or the JSON itself) in [environment
12
+ variables](#environment-variables). Additionally, Cloud SDK credentials can also
13
+ be discovered automatically, but this is only recommended during development.
14
+
15
+ ## Quickstart
16
+
17
+ 1. [Create a service account and credentials](#creating-a-service-account).
18
+ 2. Set the [environment variable](#environment-variables).
19
+
20
+ ```sh
21
+ export PUBSUB_CREDENTIALS=/path/to/json`
22
+ ```
23
+
24
+ 3. Initialize the client.
25
+
26
+ ```ruby
27
+ require "google/cloud/pubsub"
28
+
29
+ client = Google::Cloud::PubSub.new
30
+ ```
31
+
32
+ ## Project and Credential Lookup
33
+
34
+ The google-cloud-pubsub library aims to make authentication
35
+ as simple as possible, and provides several mechanisms to configure your system
36
+ without providing **Project ID** and **Service Account Credentials** directly in
37
+ code.
38
+
39
+ **Project ID** is discovered in the following order:
40
+
41
+ 1. Specify project ID in method arguments
42
+ 2. Specify project ID in configuration
43
+ 3. Discover project ID in environment variables
44
+ 4. Discover GCE project ID
45
+ 5. Discover project ID in credentials JSON
46
+
47
+ **Credentials** are discovered in the following order:
48
+
49
+ 1. Specify credentials in method arguments
50
+ 2. Specify credentials in configuration
51
+ 3. Discover credentials path in environment variables
52
+ 4. Discover credentials JSON in environment variables
53
+ 5. Discover credentials file in the Cloud SDK's path
54
+ 6. Discover GCE credentials
55
+
56
+ ### Google Cloud Platform environments
57
+
58
+ When running on Google Cloud Platform (GCP), including Google Compute Engine (GCE),
59
+ Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud Functions
60
+ (GCF) and Cloud Run, the **Project ID** and **Credentials** and are discovered
61
+ automatically. Code should be written as if already authenticated.
62
+
63
+ ### Environment Variables
64
+
65
+ The **Project ID** and **Credentials JSON** can be placed in environment
66
+ variables instead of declaring them directly in code. Each service has its own
67
+ environment variable, allowing for different service accounts to be used for
68
+ different services. (See the READMEs for the individual service gems for
69
+ details.) The path to the **Credentials JSON** file can be stored in the
70
+ environment variable, or the **Credentials JSON** itself can be stored for
71
+ environments such as Docker containers where writing files is difficult or not
72
+ encouraged.
73
+
74
+ The environment variables that google-cloud-pubsub checks for project ID are:
75
+
76
+ 1. `PUBSUB_PROJECT`
77
+ 2. `GOOGLE_CLOUD_PROJECT`
78
+
79
+ The environment variables that google-cloud-pubsub checks for credentials are configured on {Google::Cloud::PubSub::V1::Credentials}:
80
+
81
+ 1. `PUBSUB_CREDENTIALS` - Path to JSON file, or JSON contents
82
+ 2. `PUBSUB_KEYFILE` - Path to JSON file, or JSON contents
83
+ 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
84
+ 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
85
+ 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
86
+
87
+ ```ruby
88
+ require "google/cloud/pubsub"
89
+
90
+ ENV["PUBSUB_PROJECT"] = "my-project-id"
91
+ ENV["PUBSUB_CREDENTIALS"] = "path/to/keyfile.json"
92
+
93
+ client = Google::Cloud::PubSub.new
94
+ ```
95
+
96
+ ### Configuration
97
+
98
+ The **Project ID** and **Credentials JSON** can be configured instead of placing them in environment variables or providing them as arguments.
99
+
100
+ ```ruby
101
+ require "google/cloud/pubsub"
102
+
103
+ Google::Cloud::PubSub.configure do |config|
104
+ config.project_id = "my-project-id"
105
+ config.credentials = "path/to/keyfile.json"
106
+ end
107
+
108
+ client = Google::Cloud::PubSub.new
109
+ ```
110
+
111
+ ### Cloud SDK
112
+
113
+ This option allows for an easy way to authenticate during development. If
114
+ credentials are not provided in code or in environment variables, then Cloud SDK
115
+ credentials are discovered.
116
+
117
+ To configure your system for this, simply:
118
+
119
+ 1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
120
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
121
+ 3. Write code as if already authenticated.
122
+
123
+ **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
124
+ *should* only be used during development.
125
+
126
+ [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
127
+ [dev-console]: https://console.cloud.google.com/project
128
+
129
+ [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
130
+
131
+ [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
132
+ [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
133
+ [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
134
+
135
+ ## Creating a Service Account
136
+
137
+ Google Cloud requires a **Project ID** and **Service Account Credentials** to
138
+ connect to the APIs. You will use the **Project ID** and **JSON key file** to
139
+ connect to most services with google-cloud-pubsub.
140
+
141
+ If you are not running this client within [Google Cloud Platform
142
+ environments](#google-cloud-platform-environments), you need a Google
143
+ Developers service account.
144
+
145
+ 1. Visit the [Google Developers Console][dev-console].
146
+ 1. Create a new project or click on an existing project.
147
+ 1. Activate the slide-out navigation tray and select **API Manager**. From
148
+ here, you will enable the APIs that your application requires.
149
+
150
+ ![Enable the APIs that your application requires][enable-apis]
151
+
152
+ *Note: You may need to enable billing in order to use these services.*
153
+
154
+ 1. Select **Credentials** from the side navigation.
155
+
156
+ You should see a screen like one of the following.
157
+
158
+ ![Create a new service account][create-new-service-account]
159
+
160
+ ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
161
+
162
+ Find the "Add credentials" drop down and select "Service account" to be
163
+ guided through downloading a new JSON key file.
164
+
165
+ If you want to re-use an existing service account, you can easily generate a
166
+ new key file. Just select the account you wish to re-use, and click "Generate
167
+ new JSON key":
168
+
169
+ ![Re-use an existing service account][reuse-service-account]
170
+
171
+ The key file you download will be used by this library to authenticate API
172
+ requests and should be stored in a secure location.
173
+
174
+ ## Troubleshooting
175
+
176
+ If you're having trouble authenticating you can ask for help by following the
177
+ {file:TROUBLESHOOTING.md Troubleshooting Guide}.
@@ -0,0 +1,538 @@
1
+ # Release History
2
+
3
+ ### 1.9.0 / 2020-07-21
4
+
5
+ #### Features
6
+
7
+ * Add support for server-side flow control
8
+
9
+ ### 1.8.0 / 2020-06-29
10
+
11
+ #### Features
12
+
13
+ * Add Subscription#filter
14
+
15
+ ### 1.7.1 / 2020-05-28
16
+
17
+ #### Documentation
18
+
19
+ * Fix a few broken links
20
+
21
+ ### 1.7.0 / 2020-05-21
22
+
23
+ #### Features
24
+
25
+ * Add Retry Policy support
26
+ * Add RetryPolicy
27
+ * Add retry_policy param to Topic#subscribe
28
+ * Add Subscription#retry_policy
29
+ * Add Subscription#retry_policy=
30
+ * Set client-scoped UUID in initial StreamingPullRequest#client_id
31
+
32
+ ### 1.6.1 / 2020-05-06
33
+
34
+ #### Documentation
35
+
36
+ * Fix example in Emulator documentation
37
+ * Remove experimental notice from ReceivedMessage#delivery_attempt
38
+ * Wrap example URLs in backticks
39
+
40
+ ### 1.6.0 / 2020-04-06
41
+
42
+ #### Features
43
+
44
+ * Add list_topic_snapshots and get_snapshot
45
+ * Add PublisherClient#list_topic_snapshots
46
+ * Add SubscriberClient#get_snapshot
47
+
48
+ #### Documentation
49
+
50
+ * Remove a spurious link in the low-level interface documentation.
51
+
52
+ ### 1.5.0 / 2020-03-25
53
+
54
+ #### Features
55
+
56
+ * Add max_duration_per_lease_extension to Subscription#listen and Subscriber
57
+
58
+ ### 1.4.0 / 2020-03-11
59
+
60
+ #### Features
61
+
62
+ * Rename Subscriber inventory methods and params
63
+ * Rename Subscriber#inventory_limit to #max_outstanding_messages
64
+ * Rename Subscriber#bytesize to #max_outstanding_bytes
65
+ * Rename Subscriber#extension to #max_total_lease_duration
66
+ * Add deprecated aliases for the original methods
67
+ * Support separate project setting for quota/billing
68
+
69
+ #### Documentation
70
+
71
+ * Update documentation in the lower-level client
72
+
73
+ ### 1.3.1 / 2020-02-18
74
+
75
+ #### Bug Fixes
76
+
77
+ * Move Thread.new to end of AsyncPublisher#initialize
78
+
79
+ ### 1.3.0 / 2020-02-10
80
+
81
+ #### Features
82
+
83
+ * Add support for Dead Letter Topics
84
+ * Add `dead_letter_topic` and `dead_letter_max_delivery_attempts` to `Topic#subscribe`
85
+ * Add `Subscription#dead_letter_topic` and `Subscription#dead_letter_topic=`
86
+ * Add `Subscription#dead_letter_max_delivery_attempts` and `Subscription#dead_letter_max_delivery_attempts=`
87
+ * Add `ReceivedMessage#delivery_attempt`
88
+
89
+ ### 1.2.2 / 2020-02-04
90
+
91
+ #### Performance Improvements
92
+
93
+ * Add StreamingPullRequest#client_id to the lower-level API
94
+
95
+ ### 1.2.1 / 2020-01-23
96
+
97
+ #### Documentation
98
+
99
+ * Update copyright year
100
+
101
+ ### 1.2.0 / 2020-01-09
102
+
103
+ #### Features
104
+
105
+ * Add Subscriber inventory settings
106
+ * Add the following settings to Subscriber:
107
+ * Subscriber#inventory_limit
108
+ * Subscriber#inventory_bytesize
109
+ * Subscriber#extension
110
+ * Allow Subscription#listen inventory argument to be a hash.
111
+ * Update AsyncPublisher configuration defaults
112
+ * Update AsyncPublisher defaults to the following:
113
+ * max_bytes to 1MB, was 10MB.
114
+ * max_messages to 100, was 1,000.
115
+ * interval to 10 milliseconds, was 250 milliseconds.
116
+ * publish thread count to 2, was 4
117
+ * callback thread count to 4, was 8.
118
+
119
+ ### 1.1.3 / 2019-12-18
120
+
121
+ #### Bug Fixes
122
+
123
+ * Fix MonitorMixin usage on Ruby 2.7
124
+ * Ruby 2.7 will error if new_cond is called before super().
125
+ * Make the call to super() be the first call in initialize
126
+
127
+ ### 1.1.2 / 2019-11-19
128
+
129
+ #### Performance Improvements
130
+
131
+ * Update network configuration
132
+
133
+ ### 1.1.1 / 2019-11-06
134
+
135
+ #### Bug Fixes
136
+
137
+ * Update minimum runtime dependencies
138
+
139
+ #### Documentation
140
+
141
+ * Update the list of GCP environments for automatic authentication
142
+
143
+ ### 1.1.0 / 2019-10-23
144
+
145
+ #### Features
146
+
147
+ * Add support for Ordering Keys
148
+ * Google Cloud Pub/Sub ordering keys provide the ability to ensure related
149
+ messages are sent to subscribers in the order in which they were published.
150
+ The service guarantees that, for a given ordering key and publisher, messages
151
+ are sent to subscribers in the order in which they were published.
152
+ * Note: At the time of this release, ordering keys are not yet publicly enabled
153
+ and requires special project enablements.
154
+ * Add Google::Cloud::PubSub::Topic#enable_message_ordering! method.
155
+ * Add Google::Cloud::PubSub::Topic#message_ordering? method.
156
+ * Add ordering_key argument to Google::Cloud::PubSub::Topic#publish_async method.
157
+ * Add Google::Cloud::PubSub::Topic#resume_publish method.
158
+ * Add message_ordering argument to Google::Cloud::PubSub::Topic#subscribe method.
159
+ * Add Google::Cloud::PubSub::Subscription#message_ordering? method.
160
+ * Update Ruby dependency to minimum of 2.4.
161
+
162
+ ### 1.0.2 / 2019-10-10
163
+
164
+ #### Bug Fixes
165
+
166
+ * Fix Subscriber state after releasing messages
167
+ * Correctly reset the Subscriber state when releasing messages
168
+ after the callback either raises an error, or the callback
169
+ fails to call acknowledge or modify_ack_deadline on the
170
+ message. If a Subscriber fills it's inventory, and stops
171
+ pulling additional messages before all the callbacks are
172
+ completed (moves to a paused state) then the Subscriber
173
+ could become stuck in a paused state.
174
+ * A paused Subscriber will now check whether to unpause after
175
+ the callback is completed, instead of when acknowledge or
176
+ modify_ack_deadline is called on the message.
177
+
178
+ ### 1.0.1 / 2019-10-01
179
+
180
+ #### Bug Fixes
181
+
182
+ * Fix Subscriber lease issue
183
+ * Fix logic for renewing Subscriber lease for messages.
184
+ * Subscriptions with very low volume would only be renewed once.
185
+ * Now messages will be renewed as many times as it takes until
186
+ * Fix Subscriber lease timing
187
+ * Start the clock for the next lease renewal immediately.
188
+ * This help Subscriptions with a very short deadline not
189
+
190
+ ### 1.0.0 / 2019-09-30
191
+
192
+ #### Features
193
+
194
+ * Allow wait to block for specified time
195
+ * Add timeout argument to Subscriber#wait! method.
196
+ * Document timeout argument on AsyncPublisher#wait! method.
197
+ * Add stop! convenience method, calling both stop and wait
198
+ * Add Subscriber#stop! method.
199
+ * Add AsyncPublisher#stop! method.
200
+
201
+ ### 0.39.3 / 2019-09-27
202
+
203
+ #### Bug Fixes
204
+
205
+ * Fix Subscriber#wait! behavior
206
+ * Fix an issue where the Subscriber#wait! would block
207
+ for only 60 seconds, and not indefinitely.
208
+ * This was introduced in the previous release, 0.39.2.
209
+
210
+ #### Configuration Changes
211
+
212
+ * Update Subscriber acknowledge and modify_ack_deadline configuration
213
+ * The acknowledge and modify_ack_deadline RPCs have a lower size
214
+ limit than the other RPCs. Requests larger than 524288 bytes will
215
+ raise invalid argument errors.
216
+ * Update low-level client network configuration
217
+
218
+ ### 0.39.2 / 2019-09-17
219
+
220
+ #### Bug Fixes
221
+
222
+ * Do not interrupt Subscriber callbacks when stopping
223
+ * Allow in-process callbacks to complete when a Subscriber is stopped.
224
+
225
+ #### Documentation
226
+
227
+ * Update Subscriber stop and wait documentation
228
+ * Update Subscriber#stop and Subscriber#wait! method
229
+
230
+ ### 0.39.1 / 2019-09-04
231
+
232
+ #### Features
233
+
234
+ * Update Dead Letter Policy
235
+ * Add ReceivedMessage#delivery_attempt
236
+ * Experimental
237
+
238
+ ### 0.39.0 / 2019-08-23
239
+
240
+ #### Features
241
+
242
+ * Add Dead Letter Policy to low-level API
243
+ * Add Google::Cloud::PubSub::V1::Subscription#dead_letter_policy
244
+ * Add Google::Cloud::PubSub::V1::DeadLetterPolicy class
245
+
246
+ #### Documentation
247
+
248
+ * Update documentation
249
+
250
+ ### 0.38.1 / 2019-08-02
251
+
252
+ * Add endpoint argument to constructor
253
+
254
+ ### 0.38.0 / 2019-07-31
255
+
256
+ * Allow persistence_regions to be set
257
+ * Support setting persistence_regions on topic creation
258
+ and topic update.
259
+ * Allow Service endpoint to be configured
260
+ * Google::Cloud::PubSub.configure.endpoint
261
+ * Fix max threads setting in thread pools
262
+ * Thread pools once again limit the number of threads allocated.
263
+ * Reduce thread usage at startup
264
+ * Allocate threads in pool as needed, not all up front
265
+ * Update documentation links
266
+
267
+ ### 0.37.1 / 2019-07-09
268
+
269
+ * Add IAM GetPolicyOptions in the lower-level interface.
270
+ * Support overriding service host and port in the low-level interface.
271
+ * Fixed race in TimedUnaryBuffer.
272
+
273
+ ### 0.37.0 / 2019-06-17
274
+
275
+ * Add Topic#persistence_regions
276
+ * Subscriber changes
277
+ * Fix potential inventory bug
278
+ * Messages are removed after callback
279
+ * This change prevents the Subscriber inventory from filling up
280
+ when messages are never acked or nacked in the user callback.
281
+ This might happen due to an error in the user callback code.
282
+ Removing a message from the inventory will cause the message to
283
+ be redelivered and reprocessed.
284
+ * Update concurrency implementation
285
+ * Use concurrent-ruby Promises framework.
286
+ * Update network configuration
287
+ * Enable grpc.service_config_disable_resolution
288
+
289
+ ### 0.36.0 / 2019-05-21
290
+
291
+ * Add Topic#kms_key
292
+ * Add the Cloud KMS encryption key that will be used to
293
+ protect access to messages published on a topic.
294
+ * Updates to the low-level API:
295
+ * Add Topic#kms_key_name (experimental)
296
+ * Snapshots no longer marked beta.
297
+ * Update IAM documentation.
298
+
299
+ ### 0.35.0 / 2019-04-25
300
+
301
+ * Add Subscription#push_config and Subscription::PushConfig
302
+ * Add Subscription#expires_in
303
+ * Add Topic#reload!
304
+ * Add Subscription#reload!
305
+ * Update low-level generated files
306
+ * Add PushConfig#oidc_token
307
+ * Add ordering_key to PubsubMessage.
308
+ * Add enable_message_ordering to Subscription.
309
+ * Extract gRPC header values from request.
310
+ * Update documentation.
311
+
312
+ ### 0.34.1 / 2019-02-13
313
+
314
+ * Fix bug (typo) in retrieving default on_error proc.
315
+ * Update network configuration.
316
+
317
+ ### 0.34.0 / 2019-02-01
318
+
319
+ * Switch to use Google::Cloud::PubSub namespace.
320
+ * Add PubSub on_error configuration.
321
+ * Major updates to Subscriber
322
+ * Add dependency on current-ruby.
323
+ * Updates are now made using unary API calls, not the gRPC stream.
324
+ * Update Subscriber inventory lease mechanics:
325
+ * This change will help avoid race conditions by ensuring that
326
+ inventory lease renewal actions don't override ack/nack/delay
327
+ actions made on a received message via the Subscriber callback.
328
+ * Changes to avoid potential race conditions in updates.
329
+ * Add reference?/resource? helper methods:
330
+ * Topic#reference?
331
+ * Topic#resource?
332
+ * Subscription#reference?
333
+ * Subscription#resource?
334
+ * Add documentation for methods that will make an API call
335
+ when called on a reference object.
336
+ * Topic#labels
337
+ * Subscription#topic
338
+ * Subscription#deadline
339
+ * Subscription#retain_acked
340
+ * Subscription#retention
341
+ * Subscription#endpoint
342
+ * Subscription#labels
343
+ * Subscription#exists?
344
+ * Subscription#listen (without deadline optional argument)
345
+ * Add example code for avoiding API calls to Overview guide.
346
+ * Remove the #delay alias for modify_ack_deadline.
347
+ * Users should use the modify_ack_deadline and modify_ack_deadline!
348
+ methods directly instead.
349
+ * Make use of Credentials#project_id
350
+ * Use Credentials#project_id
351
+ If a project_id is not provided, use the value on the Credentials object.
352
+ This value was added in googleauth 0.7.0.
353
+ * Loosen googleauth dependency
354
+ Allow for new releases up to 0.10.
355
+ The googleauth devs have committed to maintaining the current API
356
+ and will not make backwards compatible changes before 0.10.
357
+ * Update low level API
358
+ * Add expiration_policy field
359
+ * Numerous updates and fixes to the low-level documentation,
360
+ including fixes for some broken links.i
361
+
362
+ ### 0.33.2 / 2018-10-29
363
+
364
+ * Rename delay methods to modify_ack_deadline
365
+ * Rename modify_ack_deadling aliases to delay
366
+ * This maintains backwards compatibility
367
+
368
+ ### 0.33.1 / 2018-10-03
369
+
370
+ * Update connection configuration.
371
+ * Treat Acknowledge as idempotent.
372
+
373
+ ### 0.33.0 / 2018-09-20
374
+
375
+ * Add support for user labels to Snapshot, Subscription and Topic.
376
+ * Update documentation.
377
+ * Change documentation URL to googleapis GitHub org.
378
+ * Fix circular require warning.
379
+
380
+ ### 0.32.2 / 2018-09-12
381
+
382
+ * Add missing documentation files to package.
383
+
384
+ ### 0.32.1 / 2018-09-10
385
+
386
+ * Fix issue where client_config was not being used on publisher API calls.
387
+ * Update documentation.
388
+
389
+ ### 0.32.0 / 2018-08-14
390
+
391
+ * Updated Subscriber implementation
392
+ * Revised shutdown mechanics
393
+ * Fixes stop and wait! would hanging indefinitely.
394
+ * Reduce the number of GRPC warnings printed.
395
+ * Added error callbacks to the API
396
+ * Use error handler to be notified when unhandled errors
397
+ occur on a subscriber's stream thread.
398
+ * Documentation updates.
399
+
400
+ ### 0.31.1 / 2018-08-14
401
+
402
+ * Fix bug in AsyncUnaryPusher,
403
+ * The modify_ack_deadline requests were malformed.
404
+
405
+ ### 0.31.0 / 2018-06-12
406
+
407
+ * Switch Subscriber to use unary RPC calls for ack/modack.
408
+ * Reduce number of String objects that are garbage collected.
409
+ * Documentation updates.
410
+
411
+ ### 0.30.2 / 2018-04-02
412
+
413
+ * Subscriber stability enhancements.
414
+ * Subscriber performance enhancements.
415
+
416
+ ### 0.30.1 / 2018-03-08
417
+
418
+ * Fix Subscriber thread leak.
419
+
420
+ ### 0.30.0 / 2018-02-27
421
+
422
+ * Support Shared Configuration.
423
+ * Fix issue with IAM Policy not refreshing properly.
424
+
425
+ ### 0.29.0 / 2017-12-19
426
+
427
+ * Update Subscriber's receipt of received messages.
428
+ * Refactor Subscriber implementation to fix some threading bugs.
429
+ * Update google-gax dependency to 1.0.
430
+
431
+ ### 0.28.1 / 2017-11-21
432
+
433
+ * Remove warning when connecting to Pub/Sub Emulator.
434
+
435
+ ### 0.28.0 / 2017-11-14
436
+
437
+ * Add `Google::Cloud::Pubsub::Credentials` class.
438
+ * Rename constructor arguments to `project_id` and `credentials`.
439
+ (The previous arguments `project` and `keyfile` are still supported.)
440
+ * Document `Google::Auth::Credentials` as `credentials` value.
441
+ * Update generated low level GAPIC code.
442
+ * Updated `google-gax` (`grpc`, `google-protobuf`), `googleauth` dependencies.
443
+
444
+ ### 0.27.2 / 2017-10-18
445
+
446
+ * Update documentation
447
+
448
+ ### 0.27.1 / 2017-10-11
449
+
450
+ * Add keepalive to gRPC connections.
451
+ * Update Subscriber Streaming Messages error handling
452
+ * Fix link in README
453
+
454
+ ### 0.27.0 / 2017-08-10
455
+
456
+ This is a major release that offers new functionality. It adds the ability to asynchronously publish batches of messages when a threshold is met (batch message count, total batch size, batch age). It also adds the ability to receive and acknowledge messages via multiple streams.
457
+
458
+ * Publishing Messages Asynchronously
459
+ * `Topic#publish_async` and `AsyncPublisher` added
460
+ * `AsyncPublisher` can be stopped
461
+ * `PublishResult` object is yielded from `Topic#publish_async`
462
+ * Subscriber Streaming Messages
463
+ * `Subscription#listen` changed to return a `Subscriber` object
464
+ * `Subscriber` can open multiple streams to pull messages
465
+ * `Subscriber` must be started to begin streaming messages
466
+ * `Subscriber` can be stopped
467
+ * `Subscriber`'s received messages are leased until acknowledged or rejected
468
+ * Other Additions
469
+ * `ReceivedMessage#reject!` method added (aliased as `nack!` and `ignore!`)
470
+ * `Message#published_at` attribute was added
471
+ * Removals
472
+ * `Project#publish` method has been removed
473
+ * `Project#subscribe` method has been removed
474
+ * `Project#topic` method argument `autocreate` was removed
475
+ * `Subscription#pull` method argument `autoack` was removed
476
+ * `Subscription#wait_for_messages` method argument `autoack` was removed
477
+
478
+ ### 0.26.0 / 2017-07-11
479
+
480
+ * Update GAPIC configuration to exclude `UNAVAILABLE` errors from automatic retry.
481
+ * Update initialization to raise a better error if project ID is not specified.
482
+
483
+ ### 0.25.0 / 2017-06-01
484
+
485
+ * Add Snapshot and Subscription#seek.
486
+ * Add Subscription#retain_acked and Subscription#retention.
487
+ * Update gem spec homepage links.
488
+ * Remove memoization of Policy.
489
+ * Remove force parameter from Subscription#policy and Topic#policy.
490
+ * Remove Policy#deep_dup.
491
+ * Configure gRPC max_send_message_length and max_receive_message_length
492
+ to accommodate max message size > 4 MB.
493
+
494
+ ### 0.24.0 / 2017-03-31
495
+
496
+ * Updated documentation
497
+ * Updated retry configuration for pull requests
498
+ * Automatic retry on `UNAVAILABLE` errors
499
+
500
+ ### 0.23.2 / 2017-03-03
501
+
502
+ * No public API changes.
503
+ * Update GRPC header value sent to the Pub/Sub API.
504
+
505
+ ### 0.23.1 / 2017-03-01
506
+
507
+ * No public API changes.
508
+ * Update GRPC header value sent to the Pub/Sub API.
509
+ * Low level API adds new Protobuf types and GAPIC methods.
510
+
511
+ ### 0.23.0 / 2017-02-21
512
+
513
+ * Add emulator_host parameter
514
+ * Fix GRPC retry bug
515
+ * The client_config data structure has replaced retry_codes/retry_codes_def with retry_codes
516
+ * Update GRPC/Protobuf/GAX dependencies
517
+
518
+ ### 0.22.0 / 2017-01-26
519
+
520
+ * Change class names in low-level API (GAPIC)
521
+ * Change method parameters in low-level API (GAPIC)
522
+ * Add LICENSE to package.
523
+
524
+ ### 0.21.0 / 2016-10-20
525
+
526
+ * New service constructor Google::Cloud::Pubsub.new
527
+ * New constructor argument client_config
528
+
529
+ ### 0.20.1 / 2016-09-02
530
+
531
+ * Fix an issue with the GRPC client and forked sub-processes
532
+
533
+ ### 0.20.0 / 2016-08-26
534
+
535
+ This gem contains the Google Cloud Pub/Sub service implementation for the `google-cloud` gem. The `google-cloud` gem replaces the old `gcloud` gem. Legacy code can continue to use the `gcloud` gem.
536
+
537
+ * Namespace is now `Google::Cloud`
538
+ * The `google-cloud` gem is now an umbrella package for individual gems