Skip to content

Commit b7347f4

Browse files
w32-blasterrobbavey
authored andcommitted
use the context to retrieve the pipeline_id
1 parent 5fd3105 commit b7347f4

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

lib/logstash/inputs/kafka.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ class LogStash::Inputs::Kafka < LogStash::Inputs::Base
135135
def pipeline_id
136136
respond_to?(:execution_context) ? execution_context.pipeline_id : "main"
137137
end
138-
139138
# The size of the TCP receive buffer (SO_RCVBUF) to use when reading data.
140139
config :receive_buffer_bytes, :validate => :string
141140
# The amount of time to wait before attempting to reconnect to a given host.

spec/unit/inputs/kafka_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ def wakeup
3030
end
3131

3232
describe LogStash::Inputs::Kafka do
33-
let(:pipeline_id) { SecureRandom.hex(8)}
34-
let(:config) { { 'topics' => ['logstash'], 'consumer_threads' => 4, 'pipeline_id' => pipeline_id } }
33+
let(:config) { { 'topics' => ['logstash'], 'consumer_threads' => 4 } }
3534
subject { LogStash::Inputs::Kafka.new(config) }
3635

3736
it "should register" do

0 commit comments

Comments
 (0)