# How to associate exactly one partition with one logstash consumer

**URL:** <https://discuss.elastic.co/t/how-to-associate-exactly-one-partition-with-one-logstash-consumer/139343>\
**Category:** Logstash\
**Created:** [July 10, 2018, 12:23pm UTC](https://discuss.elastic.co/t/how-to-associate-exactly-one-partition-with-one-logstash-consumer/139343 "2018-07-10T12:23:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna\_Oza](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@Krishna\_Oza](https://discuss.elastic.co/u/Krishna_Oza)\
**Post date:** [July 10, 2018, 12:23pm UTC](https://discuss.elastic.co/t/how-to-associate-exactly-one-partition-with-one-logstash-consumer/139343/1 "2018-07-10T12:23:26Z")

</div>

I have a kafka producer which is producing messages for two topics and for each topic I have allocated 4 partitions.

I have allocated 8 consumer threads for the above two topics and hence assume that each consumer thread will serve each partition.

I there a way to strictly enforce this above policy.

---

<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 7, 2018, 12:23pm UTC](https://discuss.elastic.co/t/how-to-associate-exactly-one-partition-with-one-logstash-consumer/139343/2 "2018-08-07T12:23:30Z")

</div>

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