# Deliberately fail event in logstash to requeue it

**URL:** <https://discuss.elastic.co/t/deliberately-fail-event-in-logstash-to-requeue-it/274635>\
**Category:** Logstash\
**Created:** [June 1, 2021, 1:19pm UTC](https://discuss.elastic.co/t/deliberately-fail-event-in-logstash-to-requeue-it/274635 "2021-06-01T13:19:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tumbledwyer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tumbledwyer/32/89032_2.png) [@tumbledwyer](https://discuss.elastic.co/u/tumbledwyer)\
**Post date:** [June 1, 2021, 1:19pm UTC](https://discuss.elastic.co/t/deliberately-fail-event-in-logstash-to-requeue-it/274635/1 "2021-06-01T13:19:09Z")

</div>

Hi

Is there a way to fail an event so that it can be requeued for processing later? Let's take this conf for example:

```
input {
  pipeline {
    address => "previous-pipe"
  }
}

filter {
  elasticsearch {
    hosts => ["es-analytics:9200"]
    index => "my-index"
    query => "resource.id:%{[patient][managingOrganization]}"
    fields => {
      "[resource][id]" => "[facility][id]"
    }
  }
}

output {
  #blah blah
}

```

So in this case, I want to enrich a document with an ES query, but it's possible that the resource I'm querying might not have been saved yet so my query won't return anything. So I would like to be able to requeue the event so that it can try again until it is successful.

So, is this possible or is there a better way to do this?

---

<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:** [June 29, 2021, 1:19pm UTC](https://discuss.elastic.co/t/deliberately-fail-event-in-logstash-to-requeue-it/274635/2 "2021-06-29T13:19:56Z")

</div>

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