sendAndWait

abstract fun <C : Any> sendAndWait(command: CommandMessage<C>, waitStrategy: WaitStrategy): Mono<CommandResult>

Sends a command and waits for the final result.

This method blocks until the command processing is complete or fails. If the command fails, it throws a CommandResultException containing the error details.

Return

a Mono emitting the final CommandResult

Parameters

C

the type of the command

command

the command message to send

waitStrategy

the strategy defining what stage to wait for

See also

Throws

if the command processing fails