Package-level declarations

Types

Link copied to clipboard

Service-provided deserializer for compensation events consumed from the internal saga-compensation-<participant> topic.

Link copied to clipboard

Domain-specific compensation dispatcher used by SagaCompensationEngine.

Link copied to clipboard

Service-provided serializer for compensation events that flow on each microservice's internal saga-compensation-<participant> topic.

Link copied to clipboard
data class DecodedCompensationEvent<TCommand : Any>(val sagaId: String, val stepId: Long?, val command: TCommand)

Strongly-typed envelope produced by CompensationCommandDeserializer.

Link copied to clipboard
class DefaultSagaCompensationContext<TCommand : Any>(kafkaOutboxProcessor: KafkaOutboxProcessor, compensationEventSerializer: CompensationEventSerializer<TCommand>, compensationTopic: String, objectMapper: ObjectMapper) : SagaCompensationContext<TCommand>

Default SagaCompensationContext implementation shared by SagaEngine and SagaCompensationRunner.

Link copied to clipboard

Callback surface that SagaCompensator uses to interact with the saga engine while staying decoupled from it. Hides Kafka outbox and JSON serialization details behind a small, intention-revealing API.

Link copied to clipboard

Engine for the choreography saga compensation flow.

Link copied to clipboard
open class SagaCompensationRunner<S : Saga<S>, T : SagaStep<T>, TCommand : Any>(sagaRepository: SagaRepositoryPort<S>, sagaStepRepository: SagaStepRepositoryPort<T>, compensator: SagaCompensator<S, T, TCommand>, compensationContext: SagaCompensationContext<TCommand>) : SagaCompensationTrigger

Transactional helper for SagaEngine that runs the compensation sequence in its own fresh transaction.

Link copied to clipboard

Factory hook used by SagaCompensationEngine to create a service-specific compensation step instance against the persistence-agnostic SagaStep contract.

Link copied to clipboard

Non-generic trigger used by SagaEngine to delegate compensation to a proxied bean that opens a fresh REQUIRES_NEW transaction.

Link copied to clipboard
interface SagaCompensator<S : Saga<S>, T : SagaStep<T>, TCommand : Any>

Domain-specific compensation hook used by SagaEngine.

Link copied to clipboard
open class SagaEngine<S : Saga<S>, T : SagaStep<T>>(sagaRepository: SagaRepositoryPort<S>, sagaStepRepository: SagaStepRepositoryPort<T>, objectMapper: ObjectMapper, entityFactory: SagaEntityFactory<S, T>, compensationRunner: SagaCompensationTrigger)

Reusable saga participant engine for the choreography pattern.

Link copied to clipboard
interface SagaEntityFactory<S : Saga<S>, T : SagaStep<T>>

Hook used by SagaEngine to instantiate concrete saga/saga-step instances for the owning microservice.

Link copied to clipboard
open class SagaWatchdog<S : Saga<S>, T : SagaStep<T>>(sagaRepository: SagaRepositoryPort<S>, sagaEngine: SagaEngine<S, T>, properties: SagaProperties)

Per-service watchdog that: