From a1b8ab52b98a3cca2439a32ab46bab5a25a871d0 Mon Sep 17 00:00:00 2001 From: Dimitrij Denissenko Date: Wed, 5 Feb 2014 11:10:41 +0000 Subject: [PATCH] Revert "Allow to override loop_delay" This reverts commit 84b7096ee95f9bc1df88dd39a489276a2cc4e104. --- lib/fluq/input/kafka.rb | 4 +--- spec/fluq/input/kafka_spec.rb | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/fluq/input/kafka.rb b/lib/fluq/input/kafka.rb index 5e17e67..4f823f3 100644 --- a/lib/fluq/input/kafka.rb +++ b/lib/fluq/input/kafka.rb @@ -67,8 +67,7 @@ def consumer @consumer ||= ::FluQ::Kafka::Consumer.new config[:group], config[:brokers], config[:zookeepers], config[:topic], min_bytes: config[:min_bytes], max_bytes: config[:max_bytes], - max_wait_ms: config[:max_wait_ms], - loop_delay: config[:loop_delay] + max_wait_ms: config[:max_wait_ms] end def configure @@ -81,7 +80,6 @@ def defaults min_bytes: 0, max_bytes: (1024 * 1024), max_wait_ms: 100, - loop_delay: 0.5, brokers: ["localhost:9092"], zookeepers: ["localhost:2181"] end diff --git a/spec/fluq/input/kafka_spec.rb b/spec/fluq/input/kafka_spec.rb index 05a602a..9ead4f4 100644 --- a/spec/fluq/input/kafka_spec.rb +++ b/spec/fluq/input/kafka_spec.rb @@ -22,7 +22,7 @@ def input(opts = {}) it { should be_a(FluQ::Input::Base) } its(:description) { should == "kafka:my-topic (fluq <- localhost:9092)" } its(:name) { should == "kafka:my-topic" } - its(:config) { should == {format: "json", format_options: {}, group: "fluq", min_bytes: 0, max_bytes: 1048576, max_wait_ms: 100, brokers: ["localhost:9092"], zookeepers: ["localhost:2181"], topic: "my-topic", loop_delay: 0.5} } + its(:config) { should == {format: "json", format_options: {}, group: "fluq", min_bytes: 0, max_bytes: 1048576, max_wait_ms: 100, brokers: ["localhost:9092"], zookeepers: ["localhost:2181"], topic: "my-topic"} } it 'should require a topic option' do -> { input }.should raise_error(ArgumentError, /No topic provided/)