# How to read avro records from kafka using logstash

**URL:** https://discuss.elastic.co/t/how-to-read-avro-records-from-kafka-using-logstash/184652
**Category:** Logstash
**Created:** [June 6, 2019, 7:18pm UTC](https://discuss.elastic.co/t/how-to-read-avro-records-from-kafka-using-logstash/184652 "2019-06-06T19:18:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rahulkothanath](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahulkothanath/32/99122_2.png) [@rahulkothanath](https://discuss.elastic.co/u/rahulkothanath)
#### Post date: [June 6, 2019, 7:18pm UTC](https://discuss.elastic.co/t/how-to-read-avro-records-from-kafka-using-logstash/184652/1 "2019-06-06T19:18:07Z")

</div>

I am trying to read avro records from a kafka topic using logstash.  
below is my config:

```
input{
kafka {
bootstrap_servers =>"test123"
topics => ["abc123"]
group_id => "abc123-cg1"
auto_offset_reset => "latest"

codec => avro {
        schema_uri => "/app/logstash-7.0.0/schemas/abc/abc_schema_writer.avsc"
             } 

jaas_path => "/app/logstash-7.0.0/zookeeper-jaas_abc.conf"
sasl_kerberos_service_name => "kafka"
kerberos_config => "/app/kn00/logstash-7.0.0/krb5.conf"
#sasl_mechanism => "PLAIN"
security_protocol => "SASL_SSL"
ssl_truststore_location => "/app/hdp_conf/kafka-security-abc.jks"
ssl_truststore_password => ""
}
}

filter{}

output {
#stdout{}
#stdout { codec => rubydebug }
stdout{ codec => json }

}

```

I am expecting json value as output , but it is giving empty output.  
there is no issue with my avro schema since I am using the same from other application.

is there any issue with my code in logstash?I am new to avro formats

thanks for reading and helping.

---

<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 4, 2019, 7:18pm UTC](https://discuss.elastic.co/t/how-to-read-avro-records-from-kafka-using-logstash/184652/2 "2019-07-04T19:18:12Z")

</div>

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