# Logstash pipeline in a transaction

**URL:** <https://discuss.elastic.co/t/logstash-pipeline-in-a-transaction/199661>\
**Category:** Logstash\
**Created:** [September 16, 2019, 12:43pm UTC](https://discuss.elastic.co/t/logstash-pipeline-in-a-transaction/199661 "2019-09-16T12:43:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pszemesy](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@pszemesy](https://discuss.elastic.co/u/pszemesy)\
**Post date:** [September 16, 2019, 12:43pm UTC](https://discuss.elastic.co/t/logstash-pipeline-in-a-transaction/199661/1 "2019-09-16T12:43:21Z")

</div>

Hi All,  
I have to create two separate Elasticsearch output indices from the received data with Logstash. Till now it is a simple case, but I have to do the insertion into the indices in a transaction - if the insertion into the second index fails the whole transaction should be rolled back.  
Are there any possibilities to do this?

---

<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:** [September 16, 2019, 3:10pm UTC](https://discuss.elastic.co/t/logstash-pipeline-in-a-transaction/199661/2 "2019-09-16T15:10:32Z")

</div>

If the failure is one that causes the event to be sent to a DLQ you could process the DLQ file to make sure each event is removed from both indexes, but there is no transactional support across outputs.

---

<div class="post-metadata">

**Author:** ![pszemesy](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@pszemesy](https://discuss.elastic.co/u/pszemesy)\
**Post date:** [September 26, 2019, 11:00am UTC](https://discuss.elastic.co/t/logstash-pipeline-in-a-transaction/199661/3 "2019-09-26T11:00:29Z")

</div>

Thank!

---

<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:** [October 24, 2019, 11:00am UTC](https://discuss.elastic.co/t/logstash-pipeline-in-a-transaction/199661/4 "2019-10-24T11:00:32Z")

</div>

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