MessageReceiver

class MessageReceiver<E : Any>(messages: Flux<E>, val readiness: Mono<Void> = Mono.empty(), processingAdmission: () -> Unit = {}, processingQuiescence: () -> Unit = {})

A single message source with separate readiness and processing admission.

messages must be subscribed before readiness. The readiness signal is hot and replayable: it completes only after the subscribed source can retain messages without loss, or fails when that setup cannot complete. Once every runtime component is ready, openProcessing explicitly opens transport consumption. closeProcessing revokes that logical admission before physical cancellation, without inferring lifecycle state from reactive demand or subscription count.

Constructors

Link copied to clipboard
constructor(messages: Flux<E>, readiness: Mono<Void> = Mono.empty(), processingAdmission: () -> Unit = {}, processingQuiescence: () -> Unit = {})

Properties

Link copied to clipboard
val messages: Flux<E>
Link copied to clipboard
val readiness: Mono<Void>

Functions

Link copied to clipboard

Revokes processing admission synchronously without waiting for physical source cancellation. The callback must be prompt and idempotent.

Link copied to clipboard
fun <R : Any> mapMessages(transform: (Flux<E>) -> Flux<R>): MessageReceiver<R>
Link copied to clipboard