Saga Builder
Builder for constructing a saga with multiple steps.
Functions
Link copied to clipboard
Configures saga behavior.
Link copied to clipboard
fun <R> stepWithRetry(name: String, retries: Long = 3, action: suspend () -> R, compensation: suspend (R) -> Unit? = null): SagaBuilder<T>
Adds a step with retry capability.
Link copied to clipboard
fun <R> stepWithTimeout(name: String, timeout: Duration, action: suspend () -> R, compensation: suspend (R) -> Unit? = null): SagaBuilder<T>
Adds a step with timeout.