How to read avro records from kafka using logstash

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

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 => ""


output {
#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.

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