sendAndWait

open override fun <C : Any> sendAndWait(command: CommandMessage<C>, waitPlan: WaitPlan): Mono<CommandResult>

Sends a command and waits for the final result. Throws CommandResultException if the command execution fails.

Return

A Mono emitting the final CommandResult.

Parameters

command

The command message to send.

waitPlan

The plan defining how and what to wait for.

Type Parameters

C

The type of the command body.

Throws

if the command is not idempotent.

jakarta.validation.ConstraintViolationException

if validation fails.

if the wait plan doesn't support void commands when needed.

if the command execution fails.