(create-listener workers)
Create a listener for the pubsub. It will be entry point for any published data, being responsible for routing the right consumer. However, that's on the enduser.
Create a listener for the pubsub. It will be entry point for any published data, being responsible for routing the right consumer. However, that's on the enduser.
(publish! client channel message & options)
Publish a message to a channel. When consumer-min
isn't isn't met,
archives the message. Returns whether or not consumer-min
was met.
Publish a message to a channel. When `consumer-min` isn't isn't met, archives the message. Returns whether or not `consumer-min` was met.
(subscribe! client workers & options)
Subscribe given workers
to their respective channels.
The list of workers
should look something like this:
[{:channel "my-channel" :handler (fn [msg] (do-something-with-my-msg))} {:channel "my-other-channel" :handler (fn [msg] (do-something-else msg))}]
Options:
Subscribe given `workers` to their respective channels. The list of `workers` should look something like this: `[{:channel "my-channel" :handler (fn [msg] (do-something-with-my-msg))} {:channel "my-other-channel" :handler (fn [msg] (do-something-else msg))}]` Options: - reconnect-sleep: Time to sleep before reconnecting, right after an abrupt or unexpected disconnection. - blocking?: Whether or not to block the current thread.
(unarquive-channel! client channel on-msg-fn)
Unarquives every pending message from given channel
, calling on-msg-fn
on each of them.
Unarquives every pending message from given `channel`, calling `on-msg-fn` on each of them.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close