InMemoryBroker.prototype.publish<T>(topic: string,message: T): Promise<void>
Publishes a message to a topic.
Delivers to all subscribers without a queue (fanout), and to one subscriber per queue (round-robin load balancing).
message: T
The message payload
Resolves 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.