# Conditional Pipeline Logic

**URL:** <https://discuss.elastic.co/t/conditional-pipeline-logic/227390>\
**Category:** Logstash\
**Created:** [April 9, 2020, 6:42pm UTC](https://discuss.elastic.co/t/conditional-pipeline-logic/227390 "2020-04-09T18:42:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![InfiniteLoops](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/infiniteloops/32/47144_2.png) [@InfiniteLoops](https://discuss.elastic.co/u/InfiniteLoops)\
**Post date:** [April 9, 2020, 6:42pm UTC](https://discuss.elastic.co/t/conditional-pipeline-logic/227390/1 "2020-04-09T18:42:26Z")

</div>

Logstash with an input A sending to outputs B and C. If B or C fails everything becomes blocked. If the loss of data is acceptable is the below setup possible. So if a failure occurs in the first pipeline the system switches to using the second and if that fails then it tries the third.

Three pipelines

If{1. A - \> B + C  
}else{  
2. A -\> B  
}else  
3. A -\> C

Other advice or solutions welcome on what to do in the first case if one of the outputs is blocked

---

<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:** [April 9, 2020, 10:32pm UTC](https://discuss.elastic.co/t/conditional-pipeline-logic/227390/2 "2020-04-09T22:32:43Z")

</div>

Take a look at the [output isolator](https://www.elastic.co/guide/en/logstash/current/pipeline-to-pipeline.html#output-isolator-pattern) pattern.

---

<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 7, 2020, 10:32pm UTC](https://discuss.elastic.co/t/conditional-pipeline-logic/227390/3 "2020-05-07T22:32:46Z")

</div>

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