compensateStep

abstract fun compensateStep(saga: S, step: T, context: SagaCompensationContext<TCommand>)(source)

Compensates a single completed step of saga. Implementations typically publish a typed compensation TCommand via SagaCompensationContext.publishCompensationEvent so the local Kafka listener performs the actual undo asynchronously.

Should be idempotent — SagaCompensationRunner may invoke it again after a partial failure.