Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/logstash/inputs/kafka.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def register

public
def run(logstash_queue)
@runner_consumers = consumer_threads.times.map { |i| create_consumer("#{client_id}-#{i}") }
@runner_consumers = consumer_threads.times.map { |i| create_consumer(client_id) }
@runner_threads = @runner_consumers.map { |consumer| thread_runner(logstash_queue, consumer) }
@runner_threads.each { |t| t.join }
end # def run
Expand Down
2 changes: 1 addition & 1 deletion spec/integration/inputs/kafka_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def thread_it(kafka_input, queue)
wait(timeout_seconds).for {queue.length}.to eq(num_events)
expect(queue.length).to eq(num_events)
kafka_input.kafka_consumers.each_with_index do |consumer, i|
expect(consumer.metrics.keys.first.tags["client-id"]).to eq("spec-#{i}")
expect(consumer.metrics.keys.first.tags["client-id"]).to eq("spec")
end
ensure
t.kill
Expand Down