I'm currently working with Spring AMQP version 1.3.6.RELEASE
and Spring Retry 1.1.2.RELEASE
. According to the Spring AMQP documentation section 3.3.1 one can add retry capabilities by passing in a RetryTemplate
.
Are there any existing capabilities to provide a RecoveryCallback<T>
implementation? I was reviewing the RabbitTemplate.java implementation and I couldn't find any.
The use case I'm considering is that if a *Send()
execution fails because the broker is down I'd like to implement my own custom logic.
I understand that I could wrap the convertAndSend()
call in my own RetryTemplate
implementation and implement a try { ... } catch (AmqpException e) { ... }
but I did not want to go down that road if Spring AMQP provided a cleaner implementation.