How to trigger a functionality after RabbitMQ retry max attempts are over? (Spring Integration - RabbitMQ Listener)
I want to trigger an email, after RabbitMQ Listener retrials are over and still if the process of handle failed.
retry logic is working with below code. But how to trigger the functionality (email trigger) once the max retrial attempts are over.
Adding with code of CustomeRecover
That's exactly what a .recoverer()
in that RetryInterceptorBuilder
is for.
You use there now a RejectAndDontRequeueRecoverer
, but no body stops you to implement your own MessageRecoverer
with the delegation to the RejectAndDontRequeueRecoverer
and sending a message to some MessageChannel
with a sending emails logic.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.