Liking cljdoc? Tell your friends :D

com.moclojer.rq.pubsub


create-listenerclj

(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.
sourceraw docstring

group-handlers-by-channelclj

(group-handlers-by-channel workers)
source

pack-workers-channelsclj

(pack-workers-channels workers)
source

publish!clj

(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.
sourceraw docstring

subscribe!clj

(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:

  • reconnect-sleep: Time to sleep before reconnecting, right after an abrupt or unexpected disconnection.
  • blocking?: Whether or not to block the current thread.
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.
sourceraw docstring

unarquive-channel!clj

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close