# Logstash read from kafka in a round-robin way

**URL:** <https://discuss.elastic.co/t/logstash-read-from-kafka-in-a-round-robin-way/33760>\
**Category:** Logstash\
**Created:** [November 4, 2015, 3:29pm UTC](https://discuss.elastic.co/t/logstash-read-from-kafka-in-a-round-robin-way/33760 "2015-11-04T15:29:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chengcheng\_Pei](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@Chengcheng\_Pei](https://discuss.elastic.co/u/Chengcheng_Pei)\
**Post date:** [November 4, 2015, 3:29pm UTC](https://discuss.elastic.co/t/logstash-read-from-kafka-in-a-round-robin-way/33760/1 "2015-11-04T15:29:51Z")

</div>

I have 3 partitions: 0, 1, 2. So the messages can be classified as 0, 1, 2.

eg:

1 message in partition 0: 0

3 messages in partition 1: 111

2 messages in partition 2: 22

How to make the logstash to consume messages in the order 012x12x1x  
(x means no messages at that time). The order of consumed messages look  
like: 012121.

There is partition.assignment.strategy in Kafka consumer configs ([http://kafka.apache.org/documentation.html#consumerconfigs](http://kafka.apache.org/documentation.html#consumerconfigs)). I am looking for some plugins which implements this config to read data from kafka, reorder them, and write to kafka again.

Any idea?

---

<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:** [July 6, 2017, 5:24am UTC](https://discuss.elastic.co/t/logstash-read-from-kafka-in-a-round-robin-way/33760/2 "2017-07-06T05:24:04Z")

</div>


