Package org.keycloak.events.outbox
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 Summary
ConstructorsConstructorDescriptionOutboxConfig(String entryKind, int batchSize, OutboxBackoff backoff, Duration deadLetterRetention, Duration deliveredRetention, Duration pendingMaxAge) Creates an instance of aOutboxConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbackoff()Returns the value of thebackoffrecord component.intReturns the value of thebatchSizerecord component.Returns the value of thedeadLetterRetentionrecord component.Returns the value of thedeliveredRetentionrecord component.Returns the value of theentryKindrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thependingMaxAgerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OutboxConfig
public OutboxConfig(String entryKind, int batchSize, OutboxBackoff backoff, Duration deadLetterRetention, Duration deliveredRetention, Duration pendingMaxAge) Creates an instance of aOutboxConfigrecord class.- Parameters:
entryKind- the value for theentryKindrecord componentbatchSize- the value for thebatchSizerecord componentbackoff- the value for thebackoffrecord componentdeadLetterRetention- the value for thedeadLetterRetentionrecord componentdeliveredRetention- the value for thedeliveredRetentionrecord componentpendingMaxAge- the value for thependingMaxAgerecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
entryKind
Returns the value of theentryKindrecord component.- Returns:
- the value of the
entryKindrecord component
-
batchSize
public int batchSize()Returns the value of thebatchSizerecord component.- Returns:
- the value of the
batchSizerecord component
-
backoff
Returns the value of thebackoffrecord component.- Returns:
- the value of the
backoffrecord component
-
deadLetterRetention
Returns the value of thedeadLetterRetentionrecord component.- Returns:
- the value of the
deadLetterRetentionrecord component
-
deliveredRetention
Returns the value of thedeliveredRetentionrecord component.- Returns:
- the value of the
deliveredRetentionrecord component
-
pendingMaxAge
Returns the value of thependingMaxAgerecord component.- Returns:
- the value of the
pendingMaxAgerecord component
-