sendAndWaitForSnapshot

open fun <C : Any> sendAndWaitForSnapshot(command: CommandMessage<C>): Mono<CommandResult>

Sends a command and waits until the aggregate state is snapshotted.

This convenience method waits for the command processing and subsequent snapshot creation, which is useful for ensuring data consistency in high-throughput scenarios.

Return

a Mono emitting the CommandResult when snapshot is created

Parameters

C

the type of the command

command

the command message to send

See also