racecar 2.4.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/Gemfile.lock +6 -6
- data/README.md +4 -0
- data/lib/racecar/config.rb +1 -0
- data/lib/racecar/consumer.rb +4 -2
- data/lib/racecar/datadog.rb +5 -1
- data/lib/racecar/runner.rb +1 -0
- data/lib/racecar/version.rb +1 -1
- data/racecar.gemspec +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0bbfee00d05236ed92c00a93176b230086eb91d1eba33a567a6afef91998851
|
4
|
+
data.tar.gz: f787c5a8ed72301351c8dc6428bd02303f4489cbfe98133f60c546f39f6bf2cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fd5d70a55050add5a8862d32717ecdadb3d75d9cab93b2d89d8be9bd543bd31ded571ce8685d6db8f7ee5b0997520fe21986046c72a656e4323c0e923de4c5e
|
7
|
+
data.tar.gz: 5e6f929613dda6118cade9b5d486883f935ec8b18538860b4edd4439f460c10a0dda9eb296195b9cef5b87750c9e9ca268f6b8fe2166deb9b64e597d9adddd85
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Unreleased
|
4
|
+
|
5
|
+
## v2.6.0
|
6
|
+
|
7
|
+
* Add capability to specify partition number when producing messages
|
8
|
+
|
9
|
+
## v2.5.0
|
10
|
+
|
11
|
+
* `fetch_messages` can be configured per consumer, just as the maximum timeout to wait for a full batch.
|
12
|
+
|
3
13
|
## v2.4.0
|
4
14
|
|
5
15
|
* Update librdkafka version from 1.4.0 to 1.5.0 by upgrading from rdkafka 0.8.0 to 0.10.0. ([#263](https://github.com/zendesk/racecar/pull/263))
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
racecar (2.
|
4
|
+
racecar (2.6.0)
|
5
5
|
king_konf (~> 1.0.0)
|
6
6
|
rdkafka (~> 0.10.0)
|
7
7
|
|
@@ -16,13 +16,13 @@ GEM
|
|
16
16
|
coderay (1.1.3)
|
17
17
|
concurrent-ruby (1.1.9)
|
18
18
|
diff-lcs (1.4.4)
|
19
|
-
dogstatsd-ruby (
|
20
|
-
ffi (1.15.
|
19
|
+
dogstatsd-ruby (5.2.0)
|
20
|
+
ffi (1.15.5)
|
21
21
|
i18n (1.8.10)
|
22
22
|
concurrent-ruby (~> 1.0)
|
23
23
|
king_konf (1.0.0)
|
24
24
|
method_source (1.0.0)
|
25
|
-
mini_portile2 (2.7.
|
25
|
+
mini_portile2 (2.7.1)
|
26
26
|
minitest (5.14.4)
|
27
27
|
pry (0.13.1)
|
28
28
|
coderay (~> 1.1)
|
@@ -56,7 +56,7 @@ PLATFORMS
|
|
56
56
|
DEPENDENCIES
|
57
57
|
activesupport (< 6.0)
|
58
58
|
bundler (>= 1.13, < 3)
|
59
|
-
dogstatsd-ruby (>= 4.0.0, <
|
59
|
+
dogstatsd-ruby (>= 4.0.0, < 6.0.0)
|
60
60
|
pry
|
61
61
|
racecar!
|
62
62
|
rake (> 10.0)
|
@@ -64,4 +64,4 @@ DEPENDENCIES
|
|
64
64
|
timecop
|
65
65
|
|
66
66
|
BUNDLED WITH
|
67
|
-
2.
|
67
|
+
2.3.0
|
data/README.md
CHANGED
@@ -269,6 +269,10 @@ end
|
|
269
269
|
- `group_id` – The group id to use for a given group of consumers. Note that this _must_ be different for each consumer class. If left blank a group id is generated based on the consumer class name such that (for example) a consumer with the class name `BaconConsumer` would default to a group id of `bacon-consumer`.
|
270
270
|
- `group_id_prefix` – A prefix used when generating consumer group names. For instance, if you set the prefix to be `kevin.` and your consumer class is named `BaconConsumer`, the resulting consumer group will be named `kevin.bacon-consumer`.
|
271
271
|
|
272
|
+
#### Batches
|
273
|
+
|
274
|
+
- `fetch_messages` - The number of messages to fetch in a single batch. This can be set on a per consumer basis.
|
275
|
+
|
272
276
|
#### Logging
|
273
277
|
|
274
278
|
- `logfile` – A filename that log messages should be written to. Default is `nil`, which means logs will be written to standard output.
|
data/lib/racecar/config.rb
CHANGED
@@ -223,6 +223,7 @@ module Racecar
|
|
223
223
|
self.parallel_workers = consumer_class.parallel_workers
|
224
224
|
self.subscriptions = consumer_class.subscriptions
|
225
225
|
self.max_wait_time = consumer_class.max_wait_time || self.max_wait_time
|
226
|
+
self.fetch_messages = consumer_class.fetch_messages || self.fetch_messages
|
226
227
|
self.pidfile ||= "#{group_id}.pid"
|
227
228
|
end
|
228
229
|
|
data/lib/racecar/consumer.rb
CHANGED
@@ -9,7 +9,7 @@ module Racecar
|
|
9
9
|
class << self
|
10
10
|
attr_accessor :max_wait_time
|
11
11
|
attr_accessor :group_id
|
12
|
-
attr_accessor :producer, :consumer, :parallel_workers
|
12
|
+
attr_accessor :producer, :consumer, :parallel_workers, :fetch_messages
|
13
13
|
|
14
14
|
def subscriptions
|
15
15
|
@subscriptions ||= []
|
@@ -93,13 +93,14 @@ module Racecar
|
|
93
93
|
protected
|
94
94
|
|
95
95
|
# https://github.com/appsignal/rdkafka-ruby#producing-messages
|
96
|
-
def produce(payload, topic:, key: nil, partition_key: nil, headers: nil, create_time: nil)
|
96
|
+
def produce(payload, topic:, key: nil, partition: nil, partition_key: nil, headers: nil, create_time: nil)
|
97
97
|
@delivery_handles ||= []
|
98
98
|
message_size = payload.respond_to?(:bytesize) ? payload.bytesize : 0
|
99
99
|
instrumentation_payload = {
|
100
100
|
value: payload,
|
101
101
|
headers: headers,
|
102
102
|
key: key,
|
103
|
+
partition: partition,
|
103
104
|
partition_key: partition_key,
|
104
105
|
topic: topic,
|
105
106
|
message_size: message_size,
|
@@ -112,6 +113,7 @@ module Racecar
|
|
112
113
|
topic: topic,
|
113
114
|
payload: payload,
|
114
115
|
key: key,
|
116
|
+
partition: partition,
|
115
117
|
partition_key: partition_key,
|
116
118
|
timestamp: create_time,
|
117
119
|
headers: headers,
|
data/lib/racecar/datadog.rb
CHANGED
data/lib/racecar/runner.rb
CHANGED
data/lib/racecar/version.rb
CHANGED
data/racecar.gemspec
CHANGED
@@ -30,6 +30,6 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency "rake", "> 10.0"
|
31
31
|
spec.add_development_dependency "rspec", "~> 3.0"
|
32
32
|
spec.add_development_dependency "timecop"
|
33
|
-
spec.add_development_dependency "dogstatsd-ruby", ">= 4.0.0", "<
|
33
|
+
spec.add_development_dependency "dogstatsd-ruby", ">= 4.0.0", "< 6.0.0"
|
34
34
|
spec.add_development_dependency "activesupport", ">= 4.0", "< 6.1"
|
35
35
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: racecar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Schierbeck
|
8
8
|
- Benjamin Quorning
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-02-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: king_konf
|
@@ -124,7 +124,7 @@ dependencies:
|
|
124
124
|
version: 4.0.0
|
125
125
|
- - "<"
|
126
126
|
- !ruby/object:Gem::Version
|
127
|
-
version:
|
127
|
+
version: 6.0.0
|
128
128
|
type: :development
|
129
129
|
prerelease: false
|
130
130
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -134,7 +134,7 @@ dependencies:
|
|
134
134
|
version: 4.0.0
|
135
135
|
- - "<"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
137
|
+
version: 6.0.0
|
138
138
|
- !ruby/object:Gem::Dependency
|
139
139
|
name: activesupport
|
140
140
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,7 +155,7 @@ dependencies:
|
|
155
155
|
- - "<"
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '6.1'
|
158
|
-
description:
|
158
|
+
description:
|
159
159
|
email:
|
160
160
|
- dschierbeck@zendesk.com
|
161
161
|
- bquorning@zendesk.com
|
@@ -214,7 +214,7 @@ homepage: https://github.com/zendesk/racecar
|
|
214
214
|
licenses:
|
215
215
|
- Apache License Version 2.0
|
216
216
|
metadata: {}
|
217
|
-
post_install_message:
|
217
|
+
post_install_message:
|
218
218
|
rdoc_options: []
|
219
219
|
require_paths:
|
220
220
|
- lib
|
@@ -229,8 +229,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
229
|
- !ruby/object:Gem::Version
|
230
230
|
version: '0'
|
231
231
|
requirements: []
|
232
|
-
rubygems_version: 3.
|
233
|
-
signing_key:
|
232
|
+
rubygems_version: 3.0.3
|
233
|
+
signing_key:
|
234
234
|
specification_version: 4
|
235
235
|
summary: A framework for running Kafka consumers
|
236
236
|
test_files: []
|