# Issue with beats (filebeat/metricbeat) with output to kafka

**URL:** <https://discuss.elastic.co/t/issue-with-beats-filebeat-metricbeat-with-output-to-kafka/376914>\
**Category:** Beats\
**Tags:** filebeat, metricbeat\
**Created:** [April 8, 2025, 2:14pm UTC](https://discuss.elastic.co/t/issue-with-beats-filebeat-metricbeat-with-output-to-kafka/376914 "2025-04-08T14:14:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sergeykk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergeykk/32/142511_2.png) [@sergeykk](https://discuss.elastic.co/u/sergeykk)\
**Post date:** [April 8, 2025, 2:14pm UTC](https://discuss.elastic.co/t/issue-with-beats-filebeat-metricbeat-with-output-to-kafka/376914/1 "2025-04-08T14:14:03Z")

</div>

When filebeat/metricbeat configured to send output to kafka, offset for timestamp functionality in kafka is not working.  
This is likely due to bug in Sarama (the underlying library filebeat/metricbeat use) not setting MaxTimestamp in a batch when the topic's message.timestamp.type is CreateTime. Whereas the fix is available in Sarama v1.45.1, filebeat/metricbeat is using Elastic's Sarama fork, based on old sarama version 1.19.1

Sarama upstream fix: [produce: set MaxTimestamp by rockwotj · Pull Request #3108 · IBM/sarama · GitHub](https://github.com/IBM/sarama/pull/3108)

mod.go:  
[GitHub - IBM/sarama: Sarama is a Go library for Apache Kafka.](http://github.com/Shopify/sarama) =\> [GitHub - elastic/sarama: Sarama is a Go library for Apache Kafka 0.8, and up.](http://github.com/elastic/sarama) v1.19.1-0.20220310193331-ebc2b0d8eef3
