# Logstash and kafka and order of messages

**URL:** <https://discuss.elastic.co/t/logstash-and-kafka-and-order-of-messages/227651>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 12, 2020, 8:32am UTC](https://discuss.elastic.co/t/logstash-and-kafka-and-order-of-messages/227651 "2020-04-12T08:32:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arp220](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arp220/32/84666_2.png) [@arp220](https://discuss.elastic.co/u/arp220)\
**Post date:** [April 12, 2020, 8:32am UTC](https://discuss.elastic.co/t/logstash-and-kafka-and-order-of-messages/227651/1 "2020-04-12T08:32:29Z")

</div>

Hi. We have an application with the `event log`, our application send `event log` to `Kafka` with `JSON format`. our `topic` in Kafka `has one partition` because we need to read `order message`, also we use `Logstash` for consuming `event log`  
our problem is considering that the topic has a partition, but the consumer`(Logstash)` does not read the messages in order and our order is disturbed. we use

```auto
 stdout{ codec => rubydebug }

```

in output `Logstash` config and this `Logstash` log confirms the issue.  
Why the order is messed up. Problems with Kafka or logstash or etc ?  
thanks.

---

<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:** [May 10, 2020, 8:32am UTC](https://discuss.elastic.co/t/logstash-and-kafka-and-order-of-messages/227651/2 "2020-05-10T08:32:31Z")

</div>

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