SagaProperties

@ConfigurationProperties(prefix = "veds.saga")
data class SagaProperties(val awaitResponseTimeout: Duration = Duration.ofMinutes(DEFAULT_AWAIT_RESPONSE_TIMEOUT_MINUTES), val watchdogInterval: Duration = Duration.ofMinutes(DEFAULT_WATCHDOG_INTERVAL_MINUTES), val compensationRetryCooldown: Duration = Duration.ofMinutes(DEFAULT_COMPENSATION_RETRY_COOLDOWN_MINUTES))(source)

Externalized configuration for the saga engine and its watchdog.

Bound from veds.saga.*.

Example:

veds:
saga:
await-response-timeout: 30m
watchdog-interval: 1m
compensation-retry-cooldown: 5m

Constructors

Link copied to clipboard
constructor(awaitResponseTimeout: Duration = Duration.ofMinutes(DEFAULT_AWAIT_RESPONSE_TIMEOUT_MINUTES), watchdogInterval: Duration = Duration.ofMinutes(DEFAULT_WATCHDOG_INTERVAL_MINUTES), compensationRetryCooldown: Duration = Duration.ofMinutes(DEFAULT_COMPENSATION_RETRY_COOLDOWN_MINUTES))

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

After a saga has been in AWAITING_RESPONSE for longer than this, the watchdog automatically fails it with reason "timeout", triggering compensation.

Link copied to clipboard

Minimum time between two compensation attempts on the same saga. Sagas stuck in COMPENSATING or that ended in COMPENSATION_FAILED are eligible for another compensation attempt once this cooldown elapses (based on updatedAt).

Link copied to clipboard

Scheduled interval at which the saga watchdog runs.