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