compensate

abstract fun compensate(eventStream: E, target: CompensationTarget): Mono<Void>

Compensates by processing the given event stream.

Return

A Mono that completes when compensation is done

Parameters

eventStream

The event stream to compensate with

target

The compensation target


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

Compensates events for the specified aggregate and version.

Default implementation delegates to resend with the same head and tail version.

Return

A Mono emitting the number of events resent

Parameters

aggregateId

The aggregate ID to compensate

version

The version to compensate from

target

The compensation target