EventCompensator

Interface for event compensators that can resend events for compensation purposes.

Event compensators handle the logic of replaying events to compensate for failed or incorrect processing of previous events.

Parameters

E

The type of domain event stream this compensator handles

Inheritors

Functions

Link copied to clipboard
abstract fun compensate(eventStream: E, target: CompensationTarget): Mono<Void>

Compensates by processing the given event stream.

open fun compensate(aggregateId: AggregateId, version: Int, target: CompensationTarget): Mono<Long>

Compensates events for the specified aggregate and version.

Link copied to clipboard
abstract fun resend(aggregateId: AggregateId, headVersion: Int, tailVersion: Int, target: CompensationTarget): Mono<Long>

Resends events for the specified version range.