Skip to main content
Version: Current

LoopbackBroker

@rotorsoft/act-root


@rotorsoft/act-root / act-notify / LoopbackBroker

Class: LoopbackBroker

Defined in: libs/act-notify/src/loopback.ts:13

Synchronous in-process fan-out to every subscriber.

Implements​

Constructors​

Constructor​

new LoopbackBroker(): LoopbackBroker

Returns​

LoopbackBroker

Accessors​

size​

Get Signature​

get size(): number

Defined in: libs/act-notify/src/loopback.ts:28

Subscribers currently attached — handy in tests.

Returns​

number

Methods​

publish()​

publish(message): void

Defined in: libs/act-notify/src/loopback.ts:16

Parameters​

message​

BrokerMessage

Returns​

void

Implementation of​

Broker.publish


subscribe()​

subscribe(handler): BrokerDisposer

Defined in: libs/act-notify/src/loopback.ts:20

Parameters​

handler​

(message) => void

Returns​

BrokerDisposer

Implementation of​

Broker.subscribe