RuntimeResource

interface RuntimeResource

A storage or transport resource that holds accepted work: a batch writer's pending windows, a broker producer's buffered records. The runtime flushes it after every component has stopped, within the same shutdown deadline (RuntimeResources), so the work the dispatchers accepted is written before the process exits.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun forceStop()

Releases the resource promptly without blocking; unwritten work fails. Idempotent.

Link copied to clipboard
abstract fun stopGracefully(): Mono<Void>

Stops accepting work and completes once the accepted work is written. The runtime subscribes on its lifecycle threads, so a blocking flush is allowed. After a force stop the runtime no longer waits for it.