(async->lazy-seq c)
Creates a lazy-seq from a core.async channel.
Creates a lazy-seq from a core.async channel.
(async=>rabbit channel rabbit-channel queue)
(async=>rabbit channel rabbit-channel exchange queue)
Forward all messages on channel to the RabbitMQ queue. Messages should look like:
{:message {...} ;; message payload
:metadata {...}} ;; rabbit metadata (optional)
Forward all messages on channel to the RabbitMQ queue. Messages should look like: ``` {:message {...} ;; message payload :metadata {...}} ;; rabbit metadata (optional) ```
(async=>rabbit-with-reply-to channel rabbit-channel)
(async=>rabbit-with-reply-to channel rabbit-channel exchange)
(async=>rabbit-with-reply-to channel rabbit-channel exchange ignore-no-reply-to)
Forward all messages on channel to the RabbitMQ queue specified in
:reply-to
metadata. Messages should look like:
{:message {...} ;; message payload
:metadata {:repy-to "queue"
...}} ;; rabbit metadata
If there is no :reply-to
, a warning will be logged, unless
ignore-no-reply-to
is true
Forward all messages on channel to the RabbitMQ queue specified in `:reply-to` metadata. Messages should look like: ``` {:message {...} ;; message payload :metadata {:repy-to "queue" ...}} ;; rabbit metadata ``` If there is no `:reply-to`, a warning will be logged, unless `ignore-no-reply-to` is `true`
(channel-handler channel exchange timeout)
(channel-handler channel exchange timeout close-channel?)
Returns a RabbitMQ message handler function which puts each
incoming message on channel
.
Returns a RabbitMQ message handler function which puts each incoming message on `channel`.
(go-handler [binding channel] & body)
A macro that runs code in body
, with binding
bound to each
message coming in on channel
.
A macro that runs code in `body`, with `binding` bound to each message coming in on `channel`.
(rabbit=>async rabbit-channel queue channel)
(rabbit=>async rabbit-channel queue channel options timeout)
(rabbit=>async rabbit-channel queue channel options timeout close-channel?)
Subscribes to the RabbitMQ queue, taking each payload, decoding as edn, and putting the result onto the async channel. This propagates backpressure back to rabbit by using nacks.
Subscribes to the RabbitMQ queue, taking each payload, decoding as edn, and putting the result onto the async channel. This propagates backpressure back to rabbit by using nacks.
(read-payload payload)
Unsafely read a byte array as edn.
Unsafely read a byte array as edn.
(read-port? val)
Is val a core.async channel? (At least in terms of being able to be read from with <!!)
Is val a core.async channel? (At least in terms of being able to be read from with <!!)
(responder-fn out-channel f)
Create a function that takes map of message and metadata, calls f
on message, and redirects the return to out-channel
. This is used
by responder
. Handles two cases: async channel return and regular
value return.
Create a function that takes map of message and metadata, calls `f` on message, and redirects the return to `out-channel`. This is used by `responder`. Handles two cases: async channel return and regular value return.
(streaming-responder-fn connection out-channel f threshold)
Create a function that takes map of message and metadata, calls f
on message, and redirects the return to out-channel
. If the size
of the response is going to be larger than threshold
, they are
placed on a bespoke queue and the queue's name is placed on the
out-channel
instead of the results. Sends a ::stop
message when
the response sequence is exhausted.
Create a function that takes map of message and metadata, calls `f` on message, and redirects the return to `out-channel`. If the size of the response is going to be larger than `threshold`, they are placed on a bespoke queue and the queue's name is placed on the `out-channel` instead of the results. Sends a `::stop` message when the response sequence is exhausted.
(thread-handler channel f threads)
(to-seq val)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close