Skip to content

Commit 9128420

Browse files
robbaveyw32-blaster
andcommitted
Update lib/logstash/inputs/kafka.rb
as suggested by @robbavey Co-Authored-By: w32-blaster <szasz.tamas@gmail.com>
1 parent a69a2bb commit 9128420

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/logstash/inputs/kafka.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ class LogStash::Inputs::Kafka < LogStash::Inputs::Base
132132
# partition ownership amongst consumer instances
133133
config :partition_assignment_strategy, :validate => :string
134134
# ID of the pipeline whose events you want to read from.
135-
config :pipeline_id, :validate => :string, :default => "main"
135+
def pipeline_id
136+
respond_to?(:execution_context) ? execution_context.pipeline_id : "main"
137+
end
138+
136139
# The size of the TCP receive buffer (SO_RCVBUF) to use when reading data.
137140
config :receive_buffer_bytes, :validate => :string
138141
# The amount of time to wait before attempting to reconnect to a given host.

0 commit comments

Comments
 (0)