Class StreamRetryOperationsInterceptorFactoryBean
java.lang.Object
org.springframework.amqp.rabbit.config.AbstractRetryOperationsInterceptorFactoryBean
org.springframework.amqp.rabbit.config.StatelessRetryOperationsInterceptorFactoryBean
org.springframework.rabbit.stream.retry.StreamRetryOperationsInterceptorFactoryBean
- All Implemented Interfaces:
FactoryBean<Advice>
public class StreamRetryOperationsInterceptorFactoryBean
extends StatelessRetryOperationsInterceptorFactoryBean
Convenient factory bean for creating a stateless retry interceptor for use in a
StreamListenerContainer when consuming native stream messages, giving you a
large amount of control over the behavior of a container when a listener fails. To
control the number of retry attempts or the backoff in between attempts, supply a
customized RetryOperations. Stateless retry is appropriate if your listener can
be called repeatedly between failures with no side effects. The semantics of stateless
retry mean that a listener exception is not propagated to the container until the retry
attempts are exhausted. When the retry attempts are exhausted it can be processed using
a StreamMessageRecoverer if one is provided.- Author:
- Gary Russell, Stephane Nicoll
-
Field Summary
Fields inherited from class StatelessRetryOperationsInterceptorFactoryBean
loggerFields inherited from interface FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @Nullable ObjectvoidsetMessageRecoverer(MessageRecoverer messageRecoverer) voidsetStreamMessageRecoverer(StreamMessageRecoverer messageRecoverer) Set aStreamMessageRecovererto call when retries are exhausted.Methods inherited from class StatelessRetryOperationsInterceptorFactoryBean
getObject, getObjectTypeMethods inherited from class AbstractRetryOperationsInterceptorFactoryBean
getMessageRecoverer, getRetryPolicy, setRetryPolicyMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FactoryBean
isSingleton
-
Constructor Details
-
StreamRetryOperationsInterceptorFactoryBean
public StreamRetryOperationsInterceptorFactoryBean()
-
-
Method Details
-
recover
- Overrides:
recoverin classStatelessRetryOperationsInterceptorFactoryBean
-
setStreamMessageRecoverer
Set aStreamMessageRecovererto call when retries are exhausted.- Parameters:
messageRecoverer- the recoverer.
-
setMessageRecoverer
- Overrides:
setMessageRecovererin classAbstractRetryOperationsInterceptorFactoryBean
-