# Unable to Parse AVRO using Kafka Input and Avro Codec

**URL:** <https://discuss.elastic.co/t/unable-to-parse-avro-using-kafka-input-and-avro-codec/316133>\
**Category:** Logstash\
**Created:** [October 8, 2022, 4:23pm UTC](https://discuss.elastic.co/t/unable-to-parse-avro-using-kafka-input-and-avro-codec/316133 "2022-10-08T16:23:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mastersmit](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@mastersmit](https://discuss.elastic.co/u/mastersmit)\
**Post date:** [October 8, 2022, 4:23pm UTC](https://discuss.elastic.co/t/unable-to-parse-avro-using-kafka-input-and-avro-codec/316133/1 "2022-10-08T16:23:09Z")

</div>

Hi,

I am trying to use Kafka Input and Codec Avro, to read the messages but unable to do so.

In Kafka,

```auto
{
  "id": 5839355690199358000,
  "name": "VOH*a|[RF6y?"
}

```

In Logstash Output:

```auto
    "@timestamp" => 2022-10-08T14:16:12.907374Z,
         "event" => {
        "original" => "\u0000\u0000\u0000\u0000\u0002������ǉ�\u0001\u0018VOH*a|[RF6y?"
    },
      "@version" => "1",
      "document" => {
          "id" => 0,
        "name" => ""
    }
}

```

Current Logstash Configuration:

```auto
input {
  kafka {
    bootstrap_servers => "localhost:9092"
    topics => ["avro-schema-codec"]
    codec => avro {
        schema_uri => "/Users/Smit/Desktop/logstash-8.4.3/config/avro_schema.avsc"
        target => "[document]"

    }
  }
}

filter { }

output {
   stdout { }
}

```

Schema AVSC File:

```auto
{
	"type": "record",
	"name": "MyRecord",
	"namespace": "com.mycompany",
	"fields": [
		{
			"name": "id",
			"type": "long"
		},
		{
			"name": "name",
			"type": "string"
		}
	]
}

```

---

<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:** [November 5, 2022, 4:23pm UTC](https://discuss.elastic.co/t/unable-to-parse-avro-using-kafka-input-and-avro-codec/316133/2 "2022-11-05T16:23:25Z")

</div>

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