I thought my problem was simple but after multiple attempts, it turned out to be more complicated than expected.
I'm using Amazon MQ for testing purposes and would just like all messages in all DLQs to be deleted automatically after X minutes.
The ActiveMQ documentation seems clear enough but impossible for me to apply. Even after 5 exchanges with the AWS support nothing happens. I'm going in circles trying dozens of configurations that never work. Here are some of the things I tried:
<policyEntry gcInactiveDestinations="true" inactiveTimoutBeforeGC="600000" producerFlowControl="false" queue=">">
<deadLetterStrategy>
<sharedDeadLetterStrategy expiration="3000" processExpired="true" processNonPersistent="true"/>
</deadLetterStrategy>
</policyEntry>
also
<policyEntry gcInactiveDestinations="true" inactiveTimoutBeforeGC="600000" queue=">"/>
<policyEntry queue=" ActiveMQ.DLQ.Topic.FROM_CRM_NEW">
<deadLetterStrategy>
<individualDeadLetterStrategy expiration="3000"/>
</deadLetterStrategy>
</policyEntry>
and also
<policyEntry gcInactiveDestinations="true" inactiveTimoutBeforeGC="600000" queue=">">
<deadLetterStrategy>
<discarding expiration="3000"/>
</deadLetterStrategy>
</policyEntry>
I have dozens of attempts with others configurations found on the Internet so I will not paste all here, but nothing works as expected and now I don't know how I can achieve this. Does someone here know how to do this?