Enum Class OutboxEntryStatus

java.lang.Object
java.lang.Enum<OutboxEntryStatus>
org.keycloak.models.jpa.entities.OutboxEntryStatus
All Implemented Interfaces:
Serializable, Comparable<OutboxEntryStatus>, Constable

public enum OutboxEntryStatus extends Enum<OutboxEntryStatus>
Lifecycle status of a row in the generic outbox (OUTBOX_ENTRY).

The state machine is:

     PENDING - delivery succeeds -> DELIVERED
     PENDING - retries exhausted -> DEAD_LETTER
     PENDING - upstream paused -> HELD
     HELD    - upstream resumed -> PENDING
     PENDING / HELD - admin "purge queued" -> (deleted)
     DEAD_LETTER - admin "retry" -> PENDING (resets attempts, next_attempt_at)
 

Features that don't pause never produce HELD rows; the status is generic so the drainer doesn't need to know which feature uses pause/resume.

Rows in DELIVERED are kept briefly for audit / idempotency (correlation-id dedup). Rows in DEAD_LETTER are retained for the configured per-feature dead-letter retention window before being purged. The QUEUED set captures the pre-terminal states the "purge queued" admin operation targets.

  • Enum Constant Details

    • PENDING

      public static final OutboxEntryStatus PENDING
      Entry is queued for delivery. The drainer picks up rows in this state whose next_attempt_at is due.
    • DELIVERED

      public static final OutboxEntryStatus DELIVERED
      Entry was accepted by the destination (handler returned DELIVERED) and needs no further action.
    • DEAD_LETTER

      public static final OutboxEntryStatus DEAD_LETTER
      All retry attempts have been exhausted (or the row aged beyond the configured pendingMaxAge backstop) without successful delivery. Requires admin intervention.
    • HELD

      public static final OutboxEntryStatus HELD
      Entry is parked because the upstream (e.g. SSF stream) is in a paused state. Drainers must skip rows in this state until the upstream resumes and the rows are bulk-transitioned back to PENDING in original arrival order.
  • Field Details

    • QUEUED

      public static final Set<OutboxEntryStatus> QUEUED
      Statuses representing entries that are queued — i.e. waiting to reach a terminal state. Single source of truth for the DELETE .../events/queued admin endpoints (and the disable-on-save cleanup that drives them) so future additions to the pre-terminal state set automatically extend the "purge queued" semantics without API changes.
  • Method Details

    • values

      public static OutboxEntryStatus[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OutboxEntryStatus valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null