When there is some except throw out to the listener, the message will be re-deliver next time and this is good for us, but is it possible to set a limit for the retries? such as I want to retry 3 times, and drop the message after retried 3 times.
Asked
Active
Viewed 1,267 times
2
-
Do you use spring-integration? – Xstian Dec 10 '14 at 13:13
-
yes, I am using rabbit:listener-container – Daniel Wu Dec 10 '14 at 13:50
-
There is some functionality available in Spring AMQP relating to retries: http://docs.spring.io/spring-amqp/reference/html/amqp.html#template-retry – Steve Dec 10 '14 at 14:52
-
Additionally, you could just take advantage of a chain of RabbitMQ dead letter queues. i.e. Your main queue has a DLQ, which in turn has a DLQ, and so on for as many DLQ/retries as you like. You listen to the DLQs and then anything in a final DLQ causes alerts for manual intervention. – Steve Dec 10 '14 at 14:55
-
1Have you already seen [this link](http://stackoverflow.com/q/21393517/3364187)? – Xstian Dec 10 '14 at 15:41
1 Answers
0
spring: rabbitmq: listener: simple: retry: enabled: true initial-interval: 3s max-attempts: 6 max-interval: 10s multiplier: 2
i hope it gonna help you [https://www.javainuse.com/messaging/rabbitmq/error]

rustem taralov
- 21
- 2