# Filebeat wont send all messages to kafka

**URL:** <https://discuss.elastic.co/t/filebeat-wont-send-all-messages-to-kafka/188936>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 4, 2019, 2:55pm UTC](https://discuss.elastic.co/t/filebeat-wont-send-all-messages-to-kafka/188936 "2019-07-04T14:55:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcusedvardsson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcusedvardsson/32/23742_2.png) [@marcusedvardsson](https://discuss.elastic.co/u/marcusedvardsson)\
**Post date:** [July 4, 2019, 2:55pm UTC](https://discuss.elastic.co/t/filebeat-wont-send-all-messages-to-kafka/188936/1 "2019-07-04T14:55:25Z")

</div>

Filebeat 7.2.0  
Kafka 2.2.0 (apache, not confluent)  
Logstash 7.2.0  
ElasticSearch 7.2.0  
Kibana 7.2.0

The setup is: Filebeat -\> kafka -\> logstash -\> elasticsearch

Filebeat (or is Logstash the problem?) will not sent ALL messages to kafka. It's connecting successfully and some messages will end up in elasticsearch but not all of them. I can't see where the problem is.

When I change output directly to elasticsearch everything will be sent to elasticsearch.

No errormessages in filebeat nor kafka.

Part of filebeat.yml

```
#-------------------------- Kafka output ------------------------------
output.kafka:
  enabled: true
  hosts: ["hostname:port"]
  topic: 'filebeat'
  partition.round_robin:
    reachable_only: false

  required_acks: 1
  compression: gzip
  max_message_bytes: 1000000

```

#============================== Xpack Monitoring ===============================  
xpack.monitoring.enabled: true  
xpack.monitoring.elasticsearch:  
hosts: ["es\_host:es\_port"]

#==========================#  
LOGSTASH PIPELINE:

```
input {
  kafka {
    bootstrap_servers => "server:port"
    topics => ["metricbeat", "filebeat", "heartbeat"]
    id => "logstash_kafka_beats"
  }
}

filter {
  json {
    source => "message"
  }
}

output {
  elasticsearch {
    hosts => ["http://ipaddress:9200"]
    index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
  }
}
```

---

<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:** [August 1, 2019, 2:55pm UTC](https://discuss.elastic.co/t/filebeat-wont-send-all-messages-to-kafka/188936/2 "2019-08-01T14:55:26Z")

</div>

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