Class OutboxRetryPolicy

java.lang.Object
org.chenile.orchestrator.process.outbox.OutboxRetryPolicy

public class OutboxRetryPolicy extends Object
Exponential backoff with a maximum interval and a maximum attempt count. On exhaustion the command becomes DEAD (surfaced for alerting / compensation) rather than looping forever.
  • Field Details

    • initialIntervalMillis

      public long initialIntervalMillis
    • backoffCoefficient

      public double backoffCoefficient
    • maxIntervalMillis

      public long maxIntervalMillis
    • maxAttempts

      public int maxAttempts
  • Constructor Details

    • OutboxRetryPolicy

      public OutboxRetryPolicy()
  • Method Details

    • defaults

      public static OutboxRetryPolicy defaults()
    • backoffMillis

      public long backoffMillis(int attempt)
      Delay before the given (1-based) attempt may run again.
    • isExhausted

      public boolean isExhausted(int attempt)