Configuring message_key kafka output plugin

(Maher Ben Taleb Ali) #1

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.

(Magnus B├Ąck) #2

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

(Maher Ben Taleb Ali) #3

yup thanks, you saved the day

(system) #4

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