racecar 2.10.0.beta2 → 2.11.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +5 -5
- data/CHANGELOG.md +7 -7
- data/Gemfile.lock +1 -1
- data/lib/racecar/config.rb +3 -0
- data/lib/racecar/consumer_set.rb +9 -3
- data/lib/racecar/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48e769353ddc8eb277f9f167804e610b2b806a46472f5ee44637a0b7ecca37d9
|
4
|
+
data.tar.gz: 27958f39d445e0217636d6b8f678f8872f583f9d24b84c682a1609b2ccddd4cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85522feb8f5bcdd3a3a31fa9d661892e75c3e2d4c6b27795e0ba807bbed60c5a27a3d7613f5dbc5c00b05dc80ba8a25504ec78602e35b67e7de815f28bcee38f
|
7
|
+
data.tar.gz: 1cbff8134c615a61ba6ee04cc64c87b405e5fa85c618b666df1ccec57a11526627502368a8f91d759798553169bbc935cb9a1349e4c79010fc5713e4475ec423
|
data/.github/workflows/ci.yml
CHANGED
@@ -17,12 +17,12 @@ jobs:
|
|
17
17
|
- "3.0"
|
18
18
|
- "3.1"
|
19
19
|
- "3.2"
|
20
|
-
- "3.3
|
20
|
+
- "3.3"
|
21
21
|
|
22
22
|
steps:
|
23
|
-
- uses:
|
23
|
+
- uses: actions/checkout@v4
|
24
24
|
- name: Set up Ruby
|
25
|
-
uses:
|
25
|
+
uses: ruby/setup-ruby@v1
|
26
26
|
with:
|
27
27
|
ruby-version: ${{ matrix.ruby-version }}
|
28
28
|
bundler-cache: true
|
@@ -32,9 +32,9 @@ jobs:
|
|
32
32
|
integration-specs:
|
33
33
|
runs-on: ubuntu-latest
|
34
34
|
steps:
|
35
|
-
- uses:
|
35
|
+
- uses: actions/checkout@v4
|
36
36
|
- name: Set up Ruby
|
37
|
-
uses:
|
37
|
+
uses: ruby/setup-ruby@v1
|
38
38
|
with:
|
39
39
|
ruby-version: "2.7"
|
40
40
|
bundler-cache: true
|
data/CHANGELOG.md
CHANGED
@@ -2,21 +2,21 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
-
## 2.
|
5
|
+
## 2.11.0.beta1
|
6
6
|
|
7
|
-
*
|
8
|
-
* Resolve Rails 7.1 logger incompatibility
|
9
|
-
* Test with Ruby 3.3 preview
|
7
|
+
* Configurable strategy for consuming multiple topics
|
10
8
|
|
11
|
-
## 2.10.0
|
9
|
+
## 2.10.0
|
12
10
|
|
13
11
|
* Bump rdkafka gem version to 0.13.0
|
14
12
|
* Support cooperative-sticky
|
15
13
|
* Instrument produce delivery errors
|
14
|
+
* Resolve Rails 7.1 logger incompatibility
|
15
|
+
* Don't load rails env for liveness probe
|
16
16
|
* Fix config load for liveness probe
|
17
17
|
* Send exceptions to `process_batch` instrumenter
|
18
18
|
* Docker test fixes
|
19
|
-
* Test with Ruby 3.2
|
19
|
+
* Test in CI with Ruby 3.2
|
20
20
|
|
21
21
|
## v2.9.0, v2.9.0.beta1
|
22
22
|
|
@@ -26,7 +26,7 @@
|
|
26
26
|
* Add built-in liveness probe for Kubernetes deployments.
|
27
27
|
|
28
28
|
## v2.8.2
|
29
|
-
* Handles ErroneousStateError, in previous versions the consumer would do several
|
29
|
+
* Handles ErroneousStateError, in previous versions the consumer would do several unnecessary group leave/joins. The log level is also changed to WARN instead of ERROR. ([#295](https://github.com/zendesk/racecar/pull/295))
|
30
30
|
|
31
31
|
## v2.8.1
|
32
32
|
* Adds new ErroneousStateError to racecar in order to give more information on this new possible exception.
|
data/Gemfile.lock
CHANGED
data/lib/racecar/config.rb
CHANGED
@@ -185,6 +185,9 @@ module Racecar
|
|
185
185
|
desc "Used only by the liveness probe: Max time (in seconds) between liveness events before the process is considered not healthy"
|
186
186
|
integer :liveness_probe_max_interval, default: 5
|
187
187
|
|
188
|
+
desc "Strategy for switching topics when there are multiple subscriptions. `exhaust-topic` will only switch when the consumer poll returns no messages. `round-robin` will switch after each poll regardless.\nWarning: `round-robin` will be the default in Racecar 3.x"
|
189
|
+
string :multi_subscription_strategy, allowed_values: %w(round-robin exhaust-topic), default: "exhaust-topic"
|
190
|
+
|
188
191
|
# The error handler must be set directly on the object.
|
189
192
|
attr_reader :error_handler
|
190
193
|
|
data/lib/racecar/consumer_set.rb
CHANGED
@@ -175,6 +175,7 @@ module Racecar
|
|
175
175
|
|
176
176
|
# polls a message for the current consumer, handling any API edge cases.
|
177
177
|
def poll_current_consumer(max_wait_time_ms)
|
178
|
+
@last_poll_read_nil_message = false
|
178
179
|
msg = current.poll(max_wait_time_ms)
|
179
180
|
rescue Rdkafka::RdkafkaError => e
|
180
181
|
case e.code
|
@@ -212,9 +213,14 @@ module Racecar
|
|
212
213
|
end
|
213
214
|
|
214
215
|
def maybe_select_next_consumer
|
215
|
-
|
216
|
-
|
217
|
-
|
216
|
+
case @config.multi_subscription_strategy
|
217
|
+
when "round-robin"
|
218
|
+
select_next_consumer
|
219
|
+
else # "exhaust-topic"
|
220
|
+
if @last_poll_read_nil_message
|
221
|
+
select_next_consumer
|
222
|
+
end
|
223
|
+
end
|
218
224
|
end
|
219
225
|
|
220
226
|
def select_next_consumer
|
data/lib/racecar/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: racecar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.11.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Schierbeck
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-01-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: king_konf
|
@@ -225,11 +225,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
225
225
|
version: '2.6'
|
226
226
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
227
227
|
requirements:
|
228
|
-
- - "
|
228
|
+
- - ">="
|
229
229
|
- !ruby/object:Gem::Version
|
230
|
-
version:
|
230
|
+
version: '0'
|
231
231
|
requirements: []
|
232
|
-
rubygems_version: 3.
|
232
|
+
rubygems_version: 3.5.3
|
233
233
|
signing_key:
|
234
234
|
specification_version: 4
|
235
235
|
summary: A framework for running Kafka consumers
|