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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88312452dcd53ac7b8097149e4b2f07231fdcd57
4
- data.tar.gz: 9206d8f5584cd93d366f9d41f15314a9a8e89abf
3
+ metadata.gz: ddfaecf0528861c3c78d5ef9b4f71f6ac86c0ab6
4
+ data.tar.gz: 7484e50ce5939af9e11818604f5816a65ae521d4
5
5
  SHA512:
6
- metadata.gz: 3bc5f769117603f47314259f3d6b639a370fac11b17b66883f4fe9e30087cc9d14be1c63e48603e9c69ad5a51059dcb846a666499b447915c81f454d5e0b197d
7
- data.tar.gz: 5fcdd199a4f3c047341aa96ccf458ff7ba9ff211e61513453cd5ed1a57dc7b183e9bfa5c933deeb4956b823b1045f9732fd1e7b4b74145a62738c48134602a75
6
+ metadata.gz: d8a36473a95208088663b81a39950c0cc996cb1b338a125c8f393655212da51f50ea509a64685fe75d4ea8b7bf819833757ff705849534f4924a0f85458a71d5
7
+ data.tar.gz: f71799333c99d41fd5ffc0023c1696a0cd4673bb428965c65b6707a42f7adfb65542a4d14a49eeebcdd56f60d5ceaeeb31f058e3cf79182ad7a45a5b818d6f84
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Racecar
2
2
 
3
- Introducing Racecar, your friendly and easy-to-approach Kafka consumer framework!
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
- Using [ruby-kafka](https://github.com/zendesk/ruby-kafka) 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 that optionally integrates seamlessly with Rails.
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
- begin
60
- Racecar.run(processor)
61
- rescue => e
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
- raise
65
- end
63
+ raise
66
64
  end
67
65
 
68
66
  private
@@ -2,7 +2,7 @@ require "king_konf"
2
2
 
3
3
  module Racecar
4
4
  class Config < KingKonf::Config
5
- prefix :racecar
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
- integer :offset_commit_interval, default: 10
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
- integer :heartbeat_interval, default: 10
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
- integer :pause_timeout, default: 10
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
- integer :session_timeout, default: 30
26
+ float :session_timeout, default: 30
27
27
 
28
28
  desc "How long to wait when trying to connect to a Kafka broker"
29
- integer :connect_timeout, default: 10
29
+ float :connect_timeout, default: 10
30
30
 
31
31
  desc "How long to wait when trying to communicate with a Kafka broker"
32
- integer :socket_timeout, default: 30
32
+ float :socket_timeout, default: 30
33
33
 
34
34
  desc "How long to allow the Kafka brokers to wait before returning messages"
35
- integer :max_wait_time, default: 5
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
@@ -1,3 +1,3 @@
1
1
  module Racecar
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
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.6"
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.2
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.6
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.6
27
+ version: 0.1.8
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: ruby-kafka
30
30
  requirement: !ruby/object:Gem::Requirement