# Dead Letter Queue DLQ

**URL:** <https://discuss.elastic.co/t/dead-letter-queue-dlq/205133>\
**Category:** Logstash\
**Created:** [October 24, 2019, 6:45pm UTC](https://discuss.elastic.co/t/dead-letter-queue-dlq/205133 "2019-10-24T18:45:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cglencr](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@cglencr](https://discuss.elastic.co/u/cglencr)\
**Post date:** [October 24, 2019, 6:45pm UTC](https://discuss.elastic.co/t/dead-letter-queue-dlq/205133/1 "2019-10-24T18:45:47Z")

</div>

I have searched but cannot find any documentation or discussion on how to test the DLQ in 7.4.

I have set the logstash.yml for DLQ as:  
dead\_letter\_queue.enable: true  
path.dead\_letter\_queue: "C:/Applications/ElasticSearch/DeadLetterQueue"

But how to test this works? All of the help on this site explains

1. that you can only use it with an ElasticSearch output.
2. message are only sent to the DLQ when a 400 or 403 occurs
3. has examples on how to input message that exist in a DLQ

So any advice on how to actually get a message to show up in the DLQ would be appreciated.

---

<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:** [October 24, 2019, 7:51pm UTC](https://discuss.elastic.co/t/dead-letter-queue-dlq/205133/2 "2019-10-24T19:51:29Z")

</div>

You can force a 400 with a mapping exception. The following should get a mapping exception for otherField when it tries to send the second event to elasticsearch.

```
input { generator { count => 1 lines => ['object', 'not'] } }
filter {
    mutate { add_field => { "someField" => '{ "foo": 1 }' } }
    json { source => "someField" target => "otherField" }
    if [message] == "not" {
        mutate { replace => { "otherField" => "just a string" } }
    }
}
```

---

<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:** [November 21, 2019, 7:51pm UTC](https://discuss.elastic.co/t/dead-letter-queue-dlq/205133/3 "2019-11-21T19:51:30Z")

</div>

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