Creates a new in-memory broker.
Runtime services for uuid, timestamps, and timers
Serializer for message payloads
Optionaloptions: InMemoryBrokerOptions
Optional behaviour, currently the dispatch-error reporter
Publishes a message to a topic.
Delivers to all subscribers without a queue (fanout), and to one subscriber per queue (round-robin load balancing).
The message payload type
The topic to publish to
The message payload
Optionaloptions: PublishOptionsResolves once every matching subscription's work item has been
handed to dispatch — NOT once every handler has returned. A handler's
rejection reaches the configured onDispatchError (or is observed and
dropped when none is configured); it never rejects the publish and never
becomes an unhandled rejection. This is the guarantee real brokers give —
publish returns before delivery — so the in-memory double honours it
too. Since M89c it also means one slow or throwing fan-out handler no
longer delays or aborts delivery to its siblings.
Internal
Publishes a message with framework-owned transport headers. Resolves on
dispatch hand-off (see publish); each invoked handler's
promise is RETAINED and its rejection routed to the failure path below —
never dropped, never unhandled.
Optionaloptions: PublishOptionsTri-state backend reachability (M70c).
There is no backend to be unreachable: the bus is in-process, so the
answer is simply whether the broker is running. true while ready,
false before connect() or after disconnect().
true when the broker is running, false otherwise
Sends a request and awaits a single correlated reply.
The request payload type
The reply payload type
Destination topic a responder is listening on
The request payload
Optionaloptions: RequestOptions
Reply timeout behavior
The reply payload
Internal
Sends request-reply traffic with framework-owned headers.
Optionaloptions: RequestOptionsRegisters a responder whose result is returned to the requesting caller.
The request payload type
The reply payload type
The request topic to respond on
Invoked per request; its result is returned to the caller
Optionaloptions: SubscribeOptions
Consumer group behavior
The active subscription
Subscribes to a topic.
The message payload type
The topic to subscribe to
The handler to invoke for each message
Optionaloptions: SubscribeOptions
Optional subscription options (queue for load balancing)
The subscription handle
Internal
Subscribes through the header-aware internal path.
Optionaloptions: SubscribeOptions
In-memory message broker implementation.
Provides fanout delivery to subscribers without a queue, and load-balanced (round-robin) delivery to subscribers within a queue.
Since
0.1.0