Class RetryInterceptorBuilder.StatefulRetryInterceptorBuilder
- java.lang.Object
-
- org.springframework.amqp.rabbit.config.RetryInterceptorBuilder<RetryInterceptorBuilder.StatefulRetryInterceptorBuilder,org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor>
-
- org.springframework.amqp.rabbit.config.RetryInterceptorBuilder.StatefulRetryInterceptorBuilder
-
- Enclosing class:
- RetryInterceptorBuilder<B extends RetryInterceptorBuilder<B,T>,T extends MethodInterceptor>
public static final class RetryInterceptorBuilder.StatefulRetryInterceptorBuilder extends RetryInterceptorBuilder<RetryInterceptorBuilder.StatefulRetryInterceptorBuilder,org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor>
Builder for a stateful interceptor.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.springframework.amqp.rabbit.config.RetryInterceptorBuilder
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder, RetryInterceptorBuilder.StatelessRetryInterceptorBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor
build()
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder
messageKeyGenerator(MessageKeyGenerator messageKeyGenerator)
Stateful retry requires messages to be identifiable.RetryInterceptorBuilder.StatefulRetryInterceptorBuilder
newMessageIdentifier(NewMessageIdentifier newMessageIdentifier)
Apply a custom new message identifier.-
Methods inherited from class org.springframework.amqp.rabbit.config.RetryInterceptorBuilder
_this, applyCommonSettings, backOffOptions, backOffPolicy, maxAttempts, recoverer, retryOperations, retryPolicy, stateful, stateless
-
-
-
-
Method Detail
-
messageKeyGenerator
public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder messageKeyGenerator(MessageKeyGenerator messageKeyGenerator)
Stateful retry requires messages to be identifiable. Default is to use the message id header; use a custom implementation if the message id is not present or not reliable.- Parameters:
messageKeyGenerator
- The key generator.- Returns:
- this.
-
newMessageIdentifier
public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder newMessageIdentifier(NewMessageIdentifier newMessageIdentifier)
Apply a custom new message identifier. Default is to use the redelivered header.- Parameters:
newMessageIdentifier
- The new message identifier.- Returns:
- this.
-
build
public org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor build()
- Specified by:
build
in classRetryInterceptorBuilder<RetryInterceptorBuilder.StatefulRetryInterceptorBuilder,org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor>
-
-