# Why avro message becomes nil in Logstash

**URL:** https://discuss.elastic.co/t/why-avro-message-becomes-nil-in-logstash/120839
**Category:** Logstash
**Created:** [February 21, 2018, 12:53pm UTC](https://discuss.elastic.co/t/why-avro-message-becomes-nil-in-logstash/120839 "2018-02-21T12:53:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![elasticheart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticheart/32/65189_2.png) [@elasticheart](https://discuss.elastic.co/u/elasticheart)
#### Post date: [February 21, 2018, 12:53pm UTC](https://discuss.elastic.co/t/why-avro-message-becomes-nil-in-logstash/120839/1 "2018-02-21T12:53:38Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 21, 2018, 12:54pm UTC](https://discuss.elastic.co/t/why-avro-message-becomes-nil-in-logstash/120839/2 "2018-03-21T12:54:38Z")

</div>

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