# Dead letter queue

**URL:** <https://discuss.elastic.co/t/dead-letter-queue/98376>\
**Category:** Logstash\
**Created:** [August 25, 2017, 1:51pm UTC](https://discuss.elastic.co/t/dead-letter-queue/98376 "2017-08-25T13:51:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CeeDee](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@CeeDee](https://discuss.elastic.co/u/CeeDee)\
**Post date:** [August 25, 2017, 1:51pm UTC](https://discuss.elastic.co/t/dead-letter-queue/98376/1 "2017-08-25T13:51:45Z")

</div>

Hi,

I am trying to add some additional redundancy to my RELK environment with the dead letter queue in case the connection between logstash & elasticsearch is down.

However, it seems that the dead letter queue is not working as I expected.

Expected behaviour:  
Read events from redis -\> try to index events to ES -\> not successful (since connection to ES is down) -\> save events to dead\_letter\_queue -\> repeat

Actual behaviour:

Read events from redis -\> try to index events to ES -\> not successful (since connection to ES is down) -\> logstash starts running -\> logstash not reading any more events from redis -\> redis will slowly fill up

logstash creates 1.log, 2.log etc. files to specified dead\_letter\_queue path with size = 1 byte when restarting the logstash service, so it is at least not a file permission issue.

Logstash version: 5.5.2-1  
Elasticsearch version: 5.5.2  
logstash-input-dead\_letter\_queue version: 1.0.6

logstash config file:

input {  
redis {  
host =\> "IP address"  
data\_type =\> "list"  
key =\> "keyname"  
}  
}  
filter {  
grok {  
patterns\_dir =\> ["/etc/logstash/patterns"]  
match =\> { "message" =\> "%{MYPATTERN}" }

}  
}  
output {  
elasticsearch {  
hosts =\> ["IP address:9200"]  
index =\> "test-index-%{+dd.MM.yyyy}"  
}  
}

Is it possible to achieve the expected behaviour with the dead\_letter\_queue or does it only work with events that contain mapping errors?

Thank you in advance for the help.

---

<div class="post-metadata">

**Author:** ![rcowart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rcowart/32/88091_2.png) [@rcowart](https://discuss.elastic.co/u/rcowart)\
**Post date:** [August 26, 2017, 12:34pm UTC](https://discuss.elastic.co/t/dead-letter-queue/98376/2 "2017-08-26T12:34:54Z")

</div>

You want [persistent queues](https://www.elastic.co/guide/en/logstash/current/persistent-queues.html).

---

<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:** [September 23, 2017, 12:35pm UTC](https://discuss.elastic.co/t/dead-letter-queue/98376/3 "2017-09-23T12:35:10Z")

</div>

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