racecar 2.0.0.beta5 → 2.0.0.beta6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f37b63d59011da69d49663e81d80b7681ab0ec703ca1641d95d8869d767ab60b
4
- data.tar.gz: be70ea61f2571a4f0e5a44be4984b3126374530abb8cb0a376809d3566c73d3e
3
+ metadata.gz: 540436ac94ef1004699e9cab3b7219061f23c978c3d4c1ece727a7d2ac876a69
4
+ data.tar.gz: de7e906c2e6a704edc69512c6357bad26f3de324f5437c55f44a4be51ed944a8
5
5
  SHA512:
6
- metadata.gz: b3224f3e237adff5f5d069a651708ee68c0e1ef2a2f61f95cae1eb864c0685d8bd20d9648870f147b1384d71025658852b504ebfafeeedcd9ef31dd56e23eac0
7
- data.tar.gz: 1e1ddf3901371f8863798c209dda31da2901e78d4b36d072ee4f4fd9569d0538ccbac66f3bbc033da69e38d4419e1c849ef8133ad64463931bf601e5530ec824
6
+ metadata.gz: d37108b8609b9912fd9d0853adc1519e01dfbfe56b4e36c50281d1087c8289ce5a6e11fae3e9c33673623ea3367fc67aac2564a2c010e173fc7b6f685ac6da85
7
+ data.tar.gz: 6c68f0059c1c42b7f594d0dcd477dd254759f5e1c91e826e663e060cc6c7cd74b2c1b30a0b07205de0c0808365a35bee751d5d869d990a3f8f73ec28de31c491
@@ -2,6 +2,7 @@
2
2
 
3
3
  ## racecar v2.0.0
4
4
 
5
+ * Fix `max_wait_time` usage (#179).
5
6
  * Replace `ruby-kafka` with `rdkafka-ruby`
6
7
  * Removed config option `sasl_over_ssl`
7
8
  * [Racecar::Consumer] Do not pause consuming partitions on exception
data/README.md CHANGED
@@ -21,6 +21,7 @@ The framework is based on [rdkafka-ruby](https://github.com/appsignal/rdkafka-ru
21
21
  7. [Handling errors](#handling-errors)
22
22
  8. [Logging](#logging)
23
23
  9. [Operations](#operations)
24
+ 10. [Upgrading from v1 to v2](#upgrading-from-v1-to-v2)
24
25
  3. [Development](#development)
25
26
  4. [Contributing](#contributing)
26
27
  5. [Support and Discussion](#support-and-discussion)
@@ -484,6 +485,11 @@ In order to gracefully shut down a Racecar consumer process, send it the `SIGTER
484
485
  In order to introspect the configuration of a consumer process, send it the `SIGUSR1` signal. This will make Racecar print its configuration to the standard error file descriptor associated with the consumer process, so you'll need to know where that is written to.
485
486
 
486
487
 
488
+ ### Upgrading from v1 to v2
489
+
490
+ In order to safely upgrade from Racecar v1 to v2, you need to completely shut down your consumer group before starting it up again with the v2 Racecar dependency. In general, you should avoid rolling deploys for consumers groups, so it is likely the case that this will just work for you, but it's a good idea to check first.
491
+
492
+
487
493
  ## Development
488
494
 
489
495
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -156,6 +156,10 @@ module Racecar
156
156
 
157
157
  attr_accessor :subscriptions, :logger
158
158
 
159
+ def max_wait_time_ms
160
+ max_wait_time * 1000
161
+ end
162
+
159
163
  def initialize(env: ENV)
160
164
  super(env: env)
161
165
  @error_handler = proc {}
@@ -176,7 +176,7 @@ module Racecar
176
176
  "fetch.max.bytes" => @config.max_bytes,
177
177
  "message.max.bytes" => subscription.max_bytes_per_partition,
178
178
  "fetch.min.bytes" => @config.fetch_min_bytes,
179
- "fetch.wait.max.ms" => @config.max_wait_time * 1000,
179
+ "fetch.wait.max.ms" => @config.max_wait_time_ms,
180
180
  "group.id" => @config.group_id,
181
181
  "heartbeat.interval.ms" => @config.heartbeat_interval * 1000,
182
182
  "max.poll.interval.ms" => @config.max_poll_interval * 1000,
@@ -65,12 +65,12 @@ module Racecar
65
65
  @instrumenter.instrument("main_loop", instrumentation_payload) do
66
66
  case process_method
67
67
  when :batch then
68
- msg_per_part = consumer.batch_poll(config.max_wait_time).group_by(&:partition)
68
+ msg_per_part = consumer.batch_poll(config.max_wait_time_ms).group_by(&:partition)
69
69
  msg_per_part.each_value do |messages|
70
70
  process_batch(messages)
71
71
  end
72
72
  when :single then
73
- message = consumer.poll(config.max_wait_time)
73
+ message = consumer.poll(config.max_wait_time_ms)
74
74
  process(message) if message
75
75
  end
76
76
  end
@@ -1,3 +1,3 @@
1
1
  module Racecar
2
- VERSION = "2.0.0.beta5"
2
+ VERSION = "2.0.0.beta6"
3
3
  end
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.0.0.beta5
4
+ version: 2.0.0.beta6
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: 2020-05-04 00:00:00.000000000 Z
12
+ date: 2020-08-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: king_konf