stopGracefully

open override fun stopGracefully(): Mono<Void>

Performs a graceful shutdown of the dispatcher.

This method initiates shutdown by first cancelling the subscription to stop accepting new messages, then waits for all currently active tasks to complete. The shutdown process polls every 100ms to check if active tasks have finished.

The method returns a Mono that completes when shutdown is fully finished, allowing for reactive shutdown coordination. This ensures no message processing is interrupted mid-flight.

Return

A Mono that completes when all active tasks have finished and shutdown is complete

See also

for the blocking version

BaseSubscriber.cancel

for subscription cancellation