thenNotifyAndForget

fun <E : MessageExchange<*, M>, M : Message<*, *>, CommandId, NamedBoundedContext, AggregateIdCapable> Mono<Void>.thenNotifyAndForget(commandWaitNotifier: CommandWaitNotifier, processingStage: CommandStage, messageExchange: E): Mono<Void>

Extension function that wraps a Mono to automatically notify wait strategies on completion. This provides a convenient way to add wait notification behavior to any Mono operation in the command processing pipeline.

Return

A new Mono that will send notifications when the original Mono completes.

Parameters

E

The type of message exchange.

M

The type of message in the exchange.

commandWaitNotifier

The notifier for sending wait signals.

processingStage

The processing stage to notify about.

messageExchange

The message exchange containing context information.