Logstash Avro Kafka Codec issue

Hi all,

I am running a simple logstash pipeline to consume a message from a Kafka topic, which is in AVRO format and display it i on the stdout. I get all empty elements in the logstash output.

AVRO Schema (bestMatchingOutput.avsc)


AVRO message in Kafka published through Kafka Avro console Producer. I can easily consume this message using Kafka Avro console consumer.


Logstash template

        kafka {
        codec => avro {
            schema_uri => "/testing/samplemessages/bestMatchingOutput.avsc"
        key_deserializer_class => "org.apache.kafka.common.serialization.ByteArrayDeserializer"
        value_deserializer_class => "org.apache.kafka.common.serialization.ByteArrayDeserializer"
        bootstrap_servers => "localhost:9092"
        topics => ["topic1","topic2","topic3","topic4","topic5"]         
        decorate_events => "true"
filter {}

    stdout { 
          codec => rubydebug 

No matter what I do the logstash output is empty as shown below

            "matchId" => "",
             "orgId" => "",
            "userId" => "",
        "@timestamp" => 2020-02-02T04:59:28.366Z,
    "matcherVersion" => "",
          "@version" => "1"

Any help is greatly appreciated. I am truly stuck with this issues.


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