# Logstash kafka output plugin

**URL:** <https://discuss.elastic.co/t/logstash-kafka-output-plugin/143817>\
**Category:** Logstash\
**Created:** [August 10, 2018, 7:42am UTC](https://discuss.elastic.co/t/logstash-kafka-output-plugin/143817 "2018-08-10T07:42:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jogoinar10](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jogoinar10/32/20068_2.png) [@jogoinar10](https://discuss.elastic.co/u/jogoinar10)\
**Post date:** [August 10, 2018, 7:42am UTC](https://discuss.elastic.co/t/logstash-kafka-output-plugin/143817/1 "2018-08-10T07:42:17Z")

</div>

Is there anyone here tried to use logstash to push data from elasticserach to kafka?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 10, 2018, 11:22am UTC](https://discuss.elastic.co/t/logstash-kafka-output-plugin/143817/2 "2018-08-10T11:22:21Z")

</div>

I have used elasticsearch inputs and kafka outputs. Did you have a more specific question?

---

<div class="post-metadata">

**Author:** ![rcowart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rcowart/32/88091_2.png) [@rcowart](https://discuss.elastic.co/u/rcowart)\
**Post date:** [August 10, 2018, 6:30pm UTC](https://discuss.elastic.co/t/logstash-kafka-output-plugin/143817/3 "2018-08-10T18:30:55Z")

</div>

Yes, I have.

The key is to make sure that the query you use in the elasticsearch input includes an ascending sort on the @timestamp field. This ensures that the data is written to the Kafka topic in order.

---

<div class="post-metadata">

**Author:** ![jogoinar10](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jogoinar10/32/20068_2.png) [@jogoinar10](https://discuss.elastic.co/u/jogoinar10)\
**Post date:** [August 11, 2018, 9:37am UTC](https://discuss.elastic.co/t/logstash-kafka-output-plugin/143817/4 "2018-08-11T09:37:10Z")

</div>

I tried to use kafka output plugin. My input is elasticsearch. But it duplicates the docs in kafka

---

<div class="post-metadata">

**Author:** ![jogoinar10](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jogoinar10/32/20068_2.png) [@jogoinar10](https://discuss.elastic.co/u/jogoinar10)\
**Post date:** [August 11, 2018, 9:38am UTC](https://discuss.elastic.co/t/logstash-kafka-output-plugin/143817/5 "2018-08-11T09:38:41Z")

</div>

I posted another topic in regards with my issue

> [@Duplicated data in kafka using logstash](https://discuss.elastic.co/t/duplicated-data-in-kafka-using-logstash/143677/2):
>
> I tried to use fingerprint filter plugin from logstash but the output if kafka still duplicates.

---

<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:** [September 8, 2018, 9:39am UTC](https://discuss.elastic.co/t/logstash-kafka-output-plugin/143817/6 "2018-09-08T09:39:01Z")

</div>

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