Record Class OutboxConfig

java.lang.Object
java.lang.Record
org.keycloak.events.outbox.OutboxConfig

public record OutboxConfig(String entryKind, int batchSize, OutboxBackoff backoff, Duration deadLetterRetention, Duration deliveredRetention, Duration pendingMaxAge) extends Record
Per-kind tuning parameters for OutboxDrainerTask and the accompanying retention purges. One OutboxConfig is supplied per registered entryKind, so SSF and webhooks can pick different batch sizes, backoff curves, and retention windows independently.

deadLetterRetention, deliveredRetention, and pendingMaxAge accept null or a non-positive Duration to disable the corresponding purge or backstop (kept retained indefinitely).

pendingMaxAge is a backstop that promotes QUEUED rows older than this duration to DEAD_LETTER. Bounds the worst case where rows would otherwise sit forever (e.g. handler repeatedly skipping, no per-receiver age cap, no realm/owner removal). Should be comfortably above OutboxBackoff.getMaxNaturalRetryDuration() so rows in legitimate backoff aren't prematurely promoted, and shorter than deadLetterRetention so promoted rows retain a meaningful forensic window before the dead-letter purge deletes them.

  • Constructor Details

    • OutboxConfig

      public OutboxConfig(String entryKind, int batchSize, OutboxBackoff backoff, Duration deadLetterRetention, Duration deliveredRetention, Duration pendingMaxAge)
      Creates an instance of a OutboxConfig record class.
      Parameters:
      entryKind - the value for the entryKind record component
      batchSize - the value for the batchSize record component
      backoff - the value for the backoff record component
      deadLetterRetention - the value for the deadLetterRetention record component
      deliveredRetention - the value for the deliveredRetention record component
      pendingMaxAge - the value for the pendingMaxAge record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • entryKind

      public String entryKind()
      Returns the value of the entryKind record component.
      Returns:
      the value of the entryKind record component
    • batchSize

      public int batchSize()
      Returns the value of the batchSize record component.
      Returns:
      the value of the batchSize record component
    • backoff

      public OutboxBackoff backoff()
      Returns the value of the backoff record component.
      Returns:
      the value of the backoff record component
    • deadLetterRetention

      public Duration deadLetterRetention()
      Returns the value of the deadLetterRetention record component.
      Returns:
      the value of the deadLetterRetention record component
    • deliveredRetention

      public Duration deliveredRetention()
      Returns the value of the deliveredRetention record component.
      Returns:
      the value of the deliveredRetention record component
    • pendingMaxAge

      public Duration pendingMaxAge()
      Returns the value of the pendingMaxAge record component.
      Returns:
      the value of the pendingMaxAge record component