exe/kafkr-consumer in kafkr-0.10.0 vs exe/kafkr-consumer in kafkr-0.11.0
- old
+ new
@@ -5,10 +5,11 @@
require "digest"
# Accepting command line arguments for host and port
host = ARGV[0] || "localhost"
port = ARGV[1] || 4000
+timeout = ARGV[2] || 120
puts "Running on host: #{host} and port: #{port}"
$current_consumer = nil
$restart_required = false
@@ -38,9 +39,10 @@
$handlers_changed = false
Kafkr::Consumer.configure do |config|
config.port = port
config.host = host
+ config.timeout = timeout
end
unless $handlers_loaded
Kafkr::Consumer.load_handlers if $handlers_changed == false
list_registered_handlers