Retry around Serviceinvoker with SimpleRetryPolicy exception classification
I want to retry a method annotated with ServiceActivator when some specific exceptions are thrown.
I've tried adding a RetryInterceptor to the message listener container advice chain, however the exception propgated from the service method is wrapped in a ListenerExecutionFailedException which renders the exception classification in SimpleRetryPolicy fairly useless.
I saw some examples where the advice is put in a poller inside a service-activator element, but that didn't work for me (got an error about trying to use a poller with a subscribable channel).
Am I missing something?
RequestHandlerRetryAdvice wraps Exception in a MessagingException?
I've just upgraded to 2.2.1 and trying to use RequestHandlerRetryAdvice.
I've noticed that the RetryCallback that it creates catches any exception from the invoked service and wraps it in a MessagingException, again rendering my SimpleRetryPolicy exception check useless.
Do I need to extend RequestHandlerRetryAdvice and override the invoke method?