Class DefaultConditionalRetryBehaviourHandler
java.lang.Object
io.micronaut.configuration.kafka.retry.DefaultConditionalRetryBehaviourHandler
- All Implemented Interfaces:
ConditionalRetryBehaviourHandler
@Singleton
@Primary
public class DefaultConditionalRetryBehaviourHandler
extends Object
implements ConditionalRetryBehaviourHandler
The default ConditionalRetryBehaviourHandler used when a
KafkaConsumer
fails to process a ConsumerRecord
and the error strategy is set to conditionally retry.- Since:
- 5.4.0
- Author:
- Ryan Evans
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.configuration.kafka.retry.ConditionalRetryBehaviourHandler
ConditionalRetryBehaviourHandler.ConditionalRetryBehaviour
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconditionalRetryBehaviour
(KafkaListenerException exception) Retries the record by default.
-
Constructor Details
-
DefaultConditionalRetryBehaviourHandler
public DefaultConditionalRetryBehaviourHandler()
-
-
Method Details
-
conditionalRetryBehaviour
public ConditionalRetryBehaviourHandler.ConditionalRetryBehaviour conditionalRetryBehaviour(KafkaListenerException exception) Retries the record by default. This can be overridden by implementing a custom ConditionalRetryBehaviourHandler that replaces this bean.- Specified by:
conditionalRetryBehaviour
in interfaceConditionalRetryBehaviourHandler
- Parameters:
exception
- The exception that occurred when attempting to process a record- Returns:
- The conditional retry behaviour
-