# Logstash maintain order of updates

**URL:** <https://discuss.elastic.co/t/logstash-maintain-order-of-updates/217309>\
**Category:** Logstash\
**Created:** [January 31, 2020, 7:30am UTC](https://discuss.elastic.co/t/logstash-maintain-order-of-updates/217309 "2020-01-31T07:30:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![noelzubinvictor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/noelzubinvictor/32/46090_2.png) [@noelzubinvictor](https://discuss.elastic.co/u/noelzubinvictor)\
**Post date:** [January 31, 2020, 7:30am UTC](https://discuss.elastic.co/t/logstash-maintain-order-of-updates/217309/1 "2020-01-31T07:30:36Z")

</div>

I have a logstash jdbc pipeline that syncs data from postgres to elastic search. If I set the number of logstash workers to say 16. Does the pipeline still use only 1 thread. If it does use more than 1 thread then does logstash maintain the order of updates.  
Like I want the update no.1 to always be updated in elasitcsearch before update no.2

---

<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:** [January 31, 2020, 3:00pm UTC](https://discuss.elastic.co/t/logstash-maintain-order-of-updates/217309/2 "2020-01-31T15:00:25Z")

</div>

If you want the order of events preserved then you have to set pipeline.workers to 1 and also (for now) disable [java\_execution](https://github.com/elastic/logstash/issues/10938).

---

<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:** [February 28, 2020, 3:00pm UTC](https://discuss.elastic.co/t/logstash-maintain-order-of-updates/217309/3 "2020-02-28T15:00:32Z")

</div>

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