Interface OutboxRetryPolicy

  • All Implemented Interfaces:

    
    public interface OutboxRetryPolicy
    
                        

    Interface for retry policies that determine when and how to retry failed outbox record processing.

    Implementations define the retry behavior including whether to retry based on the exception and what delay to use between retry attempts.

    Since:

    0.1.0

    Author:

    Roland Beisel

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Boolean shouldRetry(Throwable exception) Determines whether a retry should be attempted based on the exception.
      abstract Duration nextDelay(Integer retryCount) Calculates the delay before the next retry attempt.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • shouldRetry

         abstract Boolean shouldRetry(Throwable exception)

        Determines whether a retry should be attempted based on the exception.

        Parameters:
        exception - The exception that occurred during processing
        Returns:

        True if a retry should be attempted, false otherwise

      • nextDelay

         abstract Duration nextDelay(Integer retryCount)

        Calculates the delay before the next retry attempt.

        Parameters:
        retryCount - The number of retries already attempted (starting from 1)
        Returns:

        Duration to wait before the next retry attempt