Class MessageDeliveryErrorHandler.AlwaysRetry
- java.lang.Object
-
- dk.cloudcreate.essentials.components.foundation.messaging.MessageDeliveryErrorHandler.AlwaysRetry
-
- All Implemented Interfaces:
MessageDeliveryErrorHandler
- Enclosing interface:
- MessageDeliveryErrorHandler
public static class MessageDeliveryErrorHandler.AlwaysRetry extends Object implements MessageDeliveryErrorHandler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface dk.cloudcreate.essentials.components.foundation.messaging.MessageDeliveryErrorHandler
MessageDeliveryErrorHandler.AlwaysRetry, MessageDeliveryErrorHandler.StopRedeliveryOn
-
-
Constructor Summary
Constructors Constructor Description AlwaysRetry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisPermanentError(QueuedMessage queuedMessage, Exception error)This method is called when theDurableQueueConsumerexperiences an exception during Message delivery.
The result of this method determines if the Message is instantly marked as a Poison-Message/Dead-Letter-Message or if we can attempt message redelivery according to the specifiedRedeliveryPolicyStringtoString()
-
-
-
Method Detail
-
isPermanentError
public boolean isPermanentError(QueuedMessage queuedMessage, Exception error)
Description copied from interface:MessageDeliveryErrorHandlerThis method is called when theDurableQueueConsumerexperiences an exception during Message delivery.
The result of this method determines if the Message is instantly marked as a Poison-Message/Dead-Letter-Message or if we can attempt message redelivery according to the specifiedRedeliveryPolicy- Specified by:
isPermanentErrorin interfaceMessageDeliveryErrorHandler- Parameters:
queuedMessage- the message that failed to be deliverederror- the error experienced- Returns:
- true if the error is a permanent error - in which case the message is instantly marked as an Poison-Message/Dead-Letter-Message,
otherwise false - in which case the message will be redelivered according to the specified
RedeliveryPolicy
-
-