lib/logstash/inputs/nsq.rb in logstash-input-nsq-2.0.2 vs lib/logstash/inputs/nsq.rb in logstash-input-nsq-2.0.3
- old
+ new
@@ -66,12 +66,13 @@
event = LogStash::Event.new("message" => ev)
decorate(event)
output_queue << event
end
else
- event = LogStash::Event.new("message" => body)
- decorate(event)
- output_queue << event
+ @codec.decode(body) do |event|
+ decorate(event)
+ output_queue << event
+ end
end
rescue => e # parse or event creation error
@logger.error('Failed to create event', :message => "#{body}", :exception => e, :multi_events => @multi_events,
:backtrace => e.backtrace)
end # begin