Why avro message becomes nil in Logstash

Hi,

I am using ELK GA 6.0.0. I am pushing an avro message into Kafka. Below is the avsc;

{
	"type": "record",
	"name": "AvroTestVO",
	"namespace": "com.home.user.kafka.avro",
	"doc": "Test logs AVRO Schema",
	"fields": [{
			"name": "stringfield1",
			"type": "string"
		}
	]
}

Using Kafka console consume, I am able to get the data;

./kafka-console-consumer --zookeeper 192.168.0.1:2181 --topic avro_test_topic

testdata
testdata
testdata
testdata

below is the rubydebug out of Logstash;

{
    "stringfield1" => nil,
        "@version" => "1",
      "@timestamp" => 2018-02-21T12:43:54.305Z
}

below is the logstash config;

input {
	kafka{
		group_id => "avro_test_group_1"
		topics => ["avro_test_topic"]
		bootstrap_servers => "192.168.0.1:9092"
		codec => avro {
			schema_uri => "/apps/GA6/logstash-6.0.0/CONFIG_HOME/avrotest.avsc"
		}
	}
}

output{
		stdout{
			codec => rubydebug
		}
}

Is this a configuration error / a bug? Somebody kindly tell me why this is happening and how to fix this?

Thank you.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.