# Why does Logstash not clear DLQ after successful fixes?

**URL:** <https://discuss.elastic.co/t/why-does-logstash-not-clear-dlq-after-successful-fixes/113618>\
**Category:** Logstash\
**Created:** [December 29, 2017, 10:10pm UTC](https://discuss.elastic.co/t/why-does-logstash-not-clear-dlq-after-successful-fixes/113618 "2017-12-29T22:10:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![arisbanach](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@arisbanach](https://discuss.elastic.co/u/arisbanach)\
**Post date:** [December 29, 2017, 10:10pm UTC](https://discuss.elastic.co/t/why-does-logstash-not-clear-dlq-after-successful-fixes/113618/1 "2017-12-29T22:10:24Z")

</div>

I have a `main` pipeline that will sometimes send docs to its Dead Letter Queue. I have another `fixes` pipeline that fixes those issues. However, even though I can see that `fixes` is fixing and successfully processing the docs, the docs remain in the `main` Dead Letter Queue directory.

Because of this, Logstash reaches the maxQueueSize of the directory and stops processing them. Shouldn't Logstash be removing the ones that are successfully indexed so that the DLQ doesn't keep increasing and increasing until it hits that limit?

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [December 29, 2017, 11:07pm UTC](https://discuss.elastic.co/t/why-does-logstash-not-clear-dlq-after-successful-fixes/113618/2 "2017-12-29T23:07:24Z")

</div>

Unfortunately you'll need to stop logstash and remove it manually today. We're working on making the DLQ automatically rotate. Please track: [https://github.com/elastic/logstash/issues/6990](https://github.com/elastic/logstash/issues/6990)

I agree that we should also add the feature you've requested, letting the DLQ input remove processed messages.

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [December 29, 2017, 11:10pm UTC](https://discuss.elastic.co/t/why-does-logstash-not-clear-dlq-after-successful-fixes/113618/3 "2017-12-29T23:10:20Z")

</div>

I've created this issue here to track: [https://github.com/elastic/logstash/issues/8904](https://github.com/elastic/logstash/issues/8904)

---

<div class="post-metadata">

**Author:** ![arisbanach](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@arisbanach](https://discuss.elastic.co/u/arisbanach)\
**Post date:** [December 29, 2017, 11:22pm UTC](https://discuss.elastic.co/t/why-does-logstash-not-clear-dlq-after-successful-fixes/113618/4 "2017-12-29T23:22:40Z")

</div>

Thanks! Is it necessary to stop Logstash as a service first? Or can I just `rm dead_letter_queue/*`?

---

<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:** [January 26, 2018, 11:22pm UTC](https://discuss.elastic.co/t/why-does-logstash-not-clear-dlq-after-successful-fixes/113618/5 "2018-01-26T23:22:46Z")

</div>

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