racecar 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/racecar/cli.rb +4 -6
- data/lib/racecar/config.rb +8 -8
- data/lib/racecar/version.rb +1 -1
- data/racecar.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddfaecf0528861c3c78d5ef9b4f71f6ac86c0ab6
|
4
|
+
data.tar.gz: 7484e50ce5939af9e11818604f5816a65ae521d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8a36473a95208088663b81a39950c0cc996cb1b338a125c8f393655212da51f50ea509a64685fe75d4ea8b7bf819833757ff705849534f4924a0f85458a71d5
|
7
|
+
data.tar.gz: f71799333c99d41fd5ffc0023c1696a0cd4673bb428965c65b6707a42f7adfb65542a4d14a49eeebcdd56f60d5ceaeeb31f058e3cf79182ad7a45a5b818d6f84
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Racecar
|
2
2
|
|
3
|
-
|
3
|
+
Racecar is a friendly and easy-to-approach Kafka consumer framework. It allows you to write small applications that process messages stored in Kafka topics while optionally integrating with your Rails models.
|
4
4
|
|
5
|
-
|
5
|
+
The framework is based on [ruby-kafka](https://github.com/zendesk/ruby-kafka), which, when used directly, can be a challenge: it's a flexible library with lots of knobs and options. Most users don't need that level of flexibility, though. Racecar provides a simple and intuitive way to build and configure Kafka consumers.
|
6
6
|
|
7
7
|
## Table of content
|
8
8
|
|
data/lib/racecar/cli.rb
CHANGED
@@ -56,13 +56,11 @@ module Racecar
|
|
56
56
|
|
57
57
|
processor = consumer_class.new
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
$stderr.puts "=> Crashed: #{e}"
|
59
|
+
Racecar.run(processor)
|
60
|
+
rescue => e
|
61
|
+
$stderr.puts "=> Crashed: #{e}\n#{e.backtrace.join("\n")}"
|
63
62
|
|
64
|
-
|
65
|
-
end
|
63
|
+
raise
|
66
64
|
end
|
67
65
|
|
68
66
|
private
|
data/lib/racecar/config.rb
CHANGED
@@ -2,7 +2,7 @@ require "king_konf"
|
|
2
2
|
|
3
3
|
module Racecar
|
4
4
|
class Config < KingKonf::Config
|
5
|
-
|
5
|
+
env_prefix :racecar
|
6
6
|
|
7
7
|
desc "A list of Kafka brokers in the cluster that you're consuming from"
|
8
8
|
list :brokers, default: ["localhost:9092"]
|
@@ -11,28 +11,28 @@ module Racecar
|
|
11
11
|
string :client_id, default: "racecar"
|
12
12
|
|
13
13
|
desc "How frequently to commit offset positions"
|
14
|
-
|
14
|
+
float :offset_commit_interval, default: 10
|
15
15
|
|
16
16
|
desc "How many messages to process before forcing a checkpoint"
|
17
17
|
integer :offset_commit_threshold, default: 0
|
18
18
|
|
19
19
|
desc "How often to send a heartbeat message to Kafka"
|
20
|
-
|
20
|
+
float :heartbeat_interval, default: 10
|
21
21
|
|
22
22
|
desc "How long to pause a partition for if the consumer raises an exception while processing a message"
|
23
|
-
|
23
|
+
float :pause_timeout, default: 10
|
24
24
|
|
25
25
|
desc "The idle timeout after which a consumer is kicked out of the group"
|
26
|
-
|
26
|
+
float :session_timeout, default: 30
|
27
27
|
|
28
28
|
desc "How long to wait when trying to connect to a Kafka broker"
|
29
|
-
|
29
|
+
float :connect_timeout, default: 10
|
30
30
|
|
31
31
|
desc "How long to wait when trying to communicate with a Kafka broker"
|
32
|
-
|
32
|
+
float :socket_timeout, default: 30
|
33
33
|
|
34
34
|
desc "How long to allow the Kafka brokers to wait before returning messages"
|
35
|
-
|
35
|
+
float :max_wait_time, default: 5
|
36
36
|
|
37
37
|
desc "A prefix used when generating consumer group names"
|
38
38
|
string :group_id_prefix
|
data/lib/racecar/version.rb
CHANGED
data/racecar.gemspec
CHANGED
@@ -20,7 +20,7 @@ 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.add_runtime_dependency "king_konf", "~> 0.1.
|
23
|
+
spec.add_runtime_dependency "king_konf", "~> 0.1.8"
|
24
24
|
spec.add_runtime_dependency "ruby-kafka", "~> 0.4"
|
25
25
|
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.13"
|
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: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Schierbeck
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.1.
|
20
|
+
version: 0.1.8
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.1.
|
27
|
+
version: 0.1.8
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: ruby-kafka
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|