Class MessageDeliveryErrorHandler.NeverRetry
java.lang.Object
dk.cloudcreate.essentials.components.foundation.messaging.MessageDeliveryErrorHandler.NeverRetry
- All Implemented Interfaces:
MessageDeliveryErrorHandler
- Enclosing interface:
- MessageDeliveryErrorHandler
public static class MessageDeliveryErrorHandler.NeverRetry
extends Object
implements MessageDeliveryErrorHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface dk.cloudcreate.essentials.components.foundation.messaging.MessageDeliveryErrorHandler
MessageDeliveryErrorHandler.AlwaysRetry, MessageDeliveryErrorHandler.NeverRetry, MessageDeliveryErrorHandler.StopRedeliveryOn -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisPermanentError(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 specifiedRedeliveryPolicytoString()
-
Constructor Details
-
NeverRetry
public NeverRetry()
-
-
Method Details
-
isPermanentError
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
-
toString
-