0
votes

I am designing a mechanism to handle a message when it is not received by the consumer.

I use ActiveMQ Artemis. I want to configure the broker in such a way that when messages fail to deliver several times they go to DLQ like in this documentation. After unsuccessful attempts, messages will be thrown into my own DLQ address, but here my question arises.

I want the message to be sent back in the initial queue after 5 minutes. Message redirection is not really a problem, it is mentioned in the documentation.

But how can I set the message to be sent with a 5 minute delay? I see that there is such a possibility in this documentation, but it is supported from the application level and I would like to set it from broker.xml.

1

1 Answers

0
votes

The specific behavior you're looking for isn't supported, and I'm not sure it makes sense for it to actually be supported either. If the messages sent to the dead-letter address just need to be sent back to the original address after 5 minutes then I would recommend you simply configure a redelivery delay of 5 minutes.

Aside from that you could create a simple listener on your dead-letter queue that consumes any message and then sends it back to the original address with a scheduled delivery delay as described in the documentation.