通过kafka传入的数据在msgpack中编码,因此我尝试使用编解码器对其进行解压缩。 但是,会发生以下错误。
input {
kafka {
zk_connect => "localhost:2181"
topic_id => "topic"
group_id => "test"
codec => "msgpack"
}
}
output {
stdout { }
}
[FATAL][logstash.runner ] An unexpected error occurred! {:error=>#<NoMethodError: undefined method `set' for nil:NilClass....
Did you mean? send>, :backtrace=>["/home/logstash/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/logstash-codec-msgpack-3.0.7-java/lib/logstash/codecs/msgpack.rb:36:in `decode'", "/home/logstash/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-kafka-8.2.1/lib/logstash/inputs/kafka.rb:256:in `block in thread_runner'", "/home1/logstash/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-kafka-8.2.1/lib/logstash/inputs/kafka.rb:255:in `block in thread_runner'"]}```
Thanks,