racecar 2.10.0 → 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/CHANGELOG.md +4 -0
- 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 +3 -3
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/CHANGELOG.md
CHANGED
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: 2024-01-
|
12
|
+
date: 2024-01-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: king_konf
|
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
229
|
- !ruby/object:Gem::Version
|
230
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
|