Skip to main content
Version: Current

Broker

@rotorsoft/act-root


@rotorsoft/act-root / act-notify / Broker

Type Alias: Broker

Broker = object

Defined in: libs/act-notify/src/with-broker.ts:43

Minimal broker contract โ€” publish one message to every subscriber on the channel (fan-out semantics; a queue that delivers to one consumer starves every other worker's wakeup).

Methodsโ€‹

publish()โ€‹

publish(message): void | Promise<void>

Defined in: libs/act-notify/src/with-broker.ts:44

Parametersโ€‹

messageโ€‹

BrokerMessage

Returnsโ€‹

void | Promise<void>


subscribe()โ€‹

subscribe(handler): BrokerDisposer | Promise<BrokerDisposer>

Defined in: libs/act-notify/src/with-broker.ts:45

Parametersโ€‹

handlerโ€‹

(message) => void

Returnsโ€‹

BrokerDisposer | Promise<BrokerDisposer>