# NoMethodError using Avro codec with Kafka plugin

**URL:** <https://discuss.elastic.co/t/nomethoderror-using-avro-codec-with-kafka-plugin/55558>\
**Category:** Logstash\
**Created:** [July 14, 2016, 7:08pm UTC](https://discuss.elastic.co/t/nomethoderror-using-avro-codec-with-kafka-plugin/55558 "2016-07-14T19:08:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CraigWh](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@CraigWh](https://discuss.elastic.co/u/CraigWh)\
**Post date:** [July 14, 2016, 7:08pm UTC](https://discuss.elastic.co/t/nomethoderror-using-avro-codec-with-kafka-plugin/55558/1 "2016-07-14T19:08:50Z")

</div>

Hi,

I'm using the Kafka input plugin version 2.0.8 to pull Avro-encoded messages from Kafka 0.8. I have the Avro codec version 2.0.4 installed, but when I push a message into Kafka, Logstash gives the following error:

`{:exception=>#<NoMethodError: undefined method 'decode' for #<Array:0x3776056c>>...`

The backtrace indicates this is happening right on the @codec.decode line in kafka.rb. Can someone shed some light on why this exception is being thrown?

Thanks,  
Craig

---

<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:** [July 6, 2017, 4:47am UTC](https://discuss.elastic.co/t/nomethoderror-using-avro-codec-with-kafka-plugin/55558/2 "2017-07-06T04:47:59Z")

</div>


