An implementation of an event bus, where publishers and subscribers can interact via topics.
An implementation of an event bus, where publishers and subscribers can interact via topics.
(active? bus topic)
Returns true
if there are any subscribers to topic
.
Returns `true` if there are any subscribers to `topic`.
(downstream bus topic)
Returns a list of all streams subscribed to topic
.
Returns a list of all streams subscribed to `topic`.
(event-bus)
(event-bus stream-generator)
Returns an event bus that can be used with publish!
and subscribe
.
Returns an event bus that can be used with `publish!` and `subscribe`.
(publish! bus topic message)
Publishes a message on the bus, returning a deferred result representing the message
being accepted by all subscribers. To prevent one slow consumer from blocking all
the others, use manifold.stream/buffer
, or manifold.stream/connect
with a timeout
specified.
Publishes a message on the bus, returning a deferred result representing the message being accepted by all subscribers. To prevent one slow consumer from blocking all the others, use `manifold.stream/buffer`, or `manifold.stream/connect` with a timeout specified.
(subscribe bus topic)
Returns a stream which consumes all messages from topic
.
Returns a stream which consumes all messages from `topic`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close