Configuring message_key kafka output plugin

Hi,
I am trying to send data from elasticsearch into Kafka.

input {
      elasticsearch {
        hosts => "localhost"
        index => "articles"
      }
    }
    output {
      kafka {
        topic_id => "articles"
      }
    }

what I receive In Kafka is something like this "host %{message}".
when I create a message field I receive a the text within the message's field.
kafka is expecting a message_key, but the input json doesn't contain a root field so I can set it.

Sounds like you'll want to set codec => json for the kafka output.

1 Like

yup thanks, you saved the day

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