racecar 2.4.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +17 -0
- data/.github/workflows/ci.yml +1 -1
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +11 -11
- 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 +3 -3
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf00f023040645633a0f72a1935626f8f6c7175d5ccceab5d98d6991354630c5
|
4
|
+
data.tar.gz: 1edace76ea224a05b1a465228298953754f6cc6446cad64ef84e6ad79978600b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e3e02cb2d02e66154ac5cf6fadca8f0ffe837e7f4a7205c28e1aae7776241fb7c6d67bb7c6b1c17f07b7068bd65f367c90ef5507bbc0461785c4c0316c85488
|
7
|
+
data.tar.gz: 978ae74f735288329e3e17121887df53784f82a5966bd791a288701b7f33cb92f0819b2a13376de234a9ed826668d8dd5c2e29d7f1bbcf94176516e878e06c44
|
@@ -0,0 +1,17 @@
|
|
1
|
+
version: 2
|
2
|
+
registries:
|
3
|
+
artifactory:
|
4
|
+
type: rubygems-server
|
5
|
+
url: ${{secrets.ARTIFACTORY_URL}}
|
6
|
+
username: ${{secrets.ARTIFACTORY_USERNAME}}
|
7
|
+
password: ${{secrets.ARTIFACTORY_API_KEY}}
|
8
|
+
updates:
|
9
|
+
- package-ecosystem: "bundler"
|
10
|
+
vendor: true
|
11
|
+
directory: "/"
|
12
|
+
registries:
|
13
|
+
- artifactory
|
14
|
+
schedule:
|
15
|
+
interval: "daily"
|
16
|
+
allow:
|
17
|
+
- dependency-type: "direct" # only explicitly defined dependencies.
|
data/.github/workflows/ci.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Unreleased
|
4
|
+
|
5
|
+
## v2.7.0
|
6
|
+
|
7
|
+
* Update librdkafka version from 1.5.0 to 1.8.2 by upgrading from rdkafka 0.10.0 to 0.11.1. ([#283](https://github.com/zendesk/racecar/pull/283))
|
8
|
+
* Bumps minimum required Ruby version to 2.6
|
9
|
+
|
10
|
+
## v2.6.0
|
11
|
+
|
12
|
+
* Add capability to specify partition number when producing messages
|
13
|
+
|
14
|
+
## v2.5.0
|
15
|
+
|
16
|
+
* `fetch_messages` can be configured per consumer, just as the maximum timeout to wait for a full batch.
|
17
|
+
|
3
18
|
## v2.4.0
|
4
19
|
|
5
20
|
* 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,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
racecar (2.
|
4
|
+
racecar (2.7.0)
|
5
5
|
king_konf (~> 1.0.0)
|
6
|
-
rdkafka (~> 0.
|
6
|
+
rdkafka (~> 0.11.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -16,22 +16,22 @@ 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.
|
25
|
+
mini_portile2 (2.8.0)
|
26
26
|
minitest (5.14.4)
|
27
27
|
pry (0.13.1)
|
28
28
|
coderay (~> 1.1)
|
29
29
|
method_source (~> 1.0)
|
30
30
|
rake (13.0.1)
|
31
|
-
rdkafka (0.
|
32
|
-
ffi (~> 1.
|
33
|
-
mini_portile2 (~> 2.
|
34
|
-
rake (
|
31
|
+
rdkafka (0.11.1)
|
32
|
+
ffi (~> 1.15)
|
33
|
+
mini_portile2 (~> 2.6)
|
34
|
+
rake (> 12)
|
35
35
|
rspec (3.10.0)
|
36
36
|
rspec-core (~> 3.10.0)
|
37
37
|
rspec-expectations (~> 3.10.0)
|
@@ -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.7
|
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
@@ -20,16 +20,16 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.required_ruby_version = '>= 2.
|
23
|
+
spec.required_ruby_version = '>= 2.6'
|
24
24
|
|
25
25
|
spec.add_runtime_dependency "king_konf", "~> 1.0.0"
|
26
|
-
spec.add_runtime_dependency "rdkafka", "~> 0.
|
26
|
+
spec.add_runtime_dependency "rdkafka", "~> 0.11.1"
|
27
27
|
|
28
28
|
spec.add_development_dependency "bundler", [">= 1.13", "< 3"]
|
29
29
|
spec.add_development_dependency "pry"
|
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,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.7.0
|
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: 2022-02-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: king_konf
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.
|
34
|
+
version: 0.11.1
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.
|
41
|
+
version: 0.11.1
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: bundler
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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
|
@@ -166,6 +166,7 @@ extensions: []
|
|
166
166
|
extra_rdoc_files: []
|
167
167
|
files:
|
168
168
|
- ".circleci/config.yml"
|
169
|
+
- ".github/dependabot.yml"
|
169
170
|
- ".github/workflows/ci.yml"
|
170
171
|
- ".gitignore"
|
171
172
|
- ".rspec"
|
@@ -222,7 +223,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
222
223
|
requirements:
|
223
224
|
- - ">="
|
224
225
|
- !ruby/object:Gem::Version
|
225
|
-
version: '2.
|
226
|
+
version: '2.6'
|
226
227
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
227
228
|
requirements:
|
228
229
|
- - ">="
|