kafkr 0.10.0 → 0.11.0

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
  SHA256:
3
- metadata.gz: 3a404654568d9f0c4a16e16f2341757b231cefd27e02186a4de5e34e945afe07
4
- data.tar.gz: 3acf9756a6d8ff3f372d595171cb967736430768c6181b7aca9e79f44061bc8f
3
+ metadata.gz: 41bbdf52172942afa5cb0758bee83eeb452f74f3d61849841fe186e44ef323a5
4
+ data.tar.gz: fcf59de6aed2bc3644df69573091dbffeb9641f39bb5fbdece548de3cf509217
5
5
  SHA512:
6
- metadata.gz: b7ca82215482129450e112709ed46533be1638d525b433d92d571b188f93d01c787be4a4eb31cad4509d7c96df23850795bf77171972178491c2ed850868a2e0
7
- data.tar.gz: 7bb54ca0f2ac1fdd3a4db32c12f8e90bc70dfd272007b9b17204a177d488788f5c3c4430a2f12920e07c614f92deac0cd8d3b4a007ee4fc12253dea4b0efe447
6
+ metadata.gz: 1f249925d3d2de4ca159796d88628450b78fdb5d5c00c756891202d39f7d8e34b69f282613c819c2aecc734a7fc0fe0c414ea2471955c27dda394e9f27bca1d5
7
+ data.tar.gz: 8e004710cfffe4ead0df8ed181fa5f8d044ca4cb8690d6be92028473475a9b2fddea89f0c8f77fbf96ea8b3eeaa00886a8e7ec94eff338379c9797cfa8956bf7
data/exe/kafkr-consumer CHANGED
@@ -7,6 +7,7 @@ require "digest"
7
7
  # Accepting command line arguments for host and port
8
8
  host = ARGV[0] || "localhost"
9
9
  port = ARGV[1] || 4000
10
+ timeout = ARGV[2] || 120
10
11
 
11
12
  puts "Running on host: #{host} and port: #{port}"
12
13
 
@@ -40,6 +41,7 @@ def start_consumer(port, host)
40
41
  Kafkr::Consumer.configure do |config|
41
42
  config.port = port
42
43
  config.host = host
44
+ config.timeout = timeout
43
45
  end
44
46
 
45
47
  unless $handlers_loaded
@@ -18,6 +18,9 @@ module Kafkr
18
18
  def configuration
19
19
  FileUtils.mkdir_p "./.kafkr"
20
20
  @configuration ||= OpenStruct.new
21
+ @configuration.host = ENV.fetch("KAFKR_HOST", "localhost")
22
+ @configuration.port = ENV.fetch("KAFKR_PORT", 2000)
23
+ @configuration.timeout = ENV.fetch("KAFKR_CONSUMER_TIMEOUT", 120)
21
24
  @configuration.suggest_handlers = false
22
25
  @configuration
23
26
  end
@@ -150,7 +153,7 @@ module Kafkr
150
153
  socket = TCPSocket.new(@host, @port)
151
154
  attempt = 0
152
155
 
153
- Timeout.timeout(20) do
156
+ Timeout.timeout(Kafkr::Consumer.configuration.timeout) do
154
157
  sync_uid = send_message.call(message)
155
158
 
156
159
  loop do
data/lib/kafkr/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kafkr
4
- VERSION = "0.10.0"
4
+ VERSION = "0.11.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kafkr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Kuldvee Burke