# Logstash configuration when failing to handle message

**URL:** <https://discuss.elastic.co/t/logstash-configuration-when-failing-to-handle-message/333406>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [May 15, 2023, 7:02am UTC](https://discuss.elastic.co/t/logstash-configuration-when-failing-to-handle-message/333406 "2023-05-15T07:02:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheZadok42](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thezadok42/32/114583_2.png) [@TheZadok42](https://discuss.elastic.co/u/TheZadok42)\
**Post date:** [May 15, 2023, 7:02am UTC](https://discuss.elastic.co/t/logstash-configuration-when-failing-to-handle-message/333406/1 "2023-05-15T07:02:10Z")

</div>

Hi!  
Recently I started to integrate logstash into our infrastructure, and while reading the documentation I didn’t quite understand how to handle bad messages.

My current flow is as follows: Application -\> rabbitmq -\> logstash -\> elastic.  
I want to add a case where if a message fails (bad content, too many tasks on the cluster…) logstash will send back to the RabbitMQ to a queue named BAD.  
Is that an option?

---

<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 12, 2023, 7:02am UTC](https://discuss.elastic.co/t/logstash-configuration-when-failing-to-handle-message/333406/2 "2023-06-12T07:02:49Z")

</div>

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