DomainEventCompensator
class DomainEventCompensator(eventStore: EventStore, eventBus: DomainEventBus) : EventCompensator<DomainEventStream>
Compensator for domain event streams.
This class handles compensation operations for domain events by resending event streams to the event bus with compensation metadata. It can compensate individual event streams or resend ranges of events from the event store.
Parameters
eventStore
The event store to use for loading events
eventBus
The event bus to use for sending compensated events
See also
Constructors
Functions
Link copied to clipboard
open override fun compensate(eventStream: DomainEventStream, target: CompensationTarget): Mono<Void>
Compensates an event stream by marking it for compensation and resending.
Compensates events for the specified aggregate and version.
Link copied to clipboard
open override fun resend(aggregateId: AggregateId, headVersion: Int, tailVersion: Int, target: CompensationTarget): Mono<Long>
Resends a range of events from the event store with compensation.