I have a RabbitMQ instance that has an exchange, a regular queue and a dead letter queue. Rejected messages are moved from the regular queue to the dead letter queue. These rejected messages are not important to me because any missed data is supplied again the next day.
Currently I regularly purge the messages in the dead letter queue, but I want to automate it. How do I do that?
All the tutorials that I've found so far explain how to expire messages using policies or tags, by which they are moved from the regular queue to the dead letter queue. But none of these tutorials talk about the situation where you want to expire messages that are already in the dead letter queue.
I just want to get rid of those messages, not save them to reprocess later.
How do I do that?