compensate

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

Performs compensation for the specified aggregate and version.

Routes the compensation request to the appropriate compensator based on the function kind (EVENT or STATE_EVENT).

Return

A Mono emitting the number of events resent, or an error for unsupported function kinds

Parameters

aggregateId

The ID of the aggregate to compensate

version

The version to compensate from

target

The compensation target specifying what to compensate