(put! conn {:keys [queue-name payload]})
Put a job on a queue - payload has to be JSON-able, or a string
Put a job on a queue - payload has to be JSON-able, or a string
(start! conn {:keys [queue-name handler concurrency]})
Core job consuming and processing logic. Resturns a Consumer record ,which holds the following
queue-name
optionconcurrency
optionhandler
function, which receives a map of {id payload queue-name}
Consumer can be closed with with-close
etcCore job consuming and processing logic. Resturns a Consumer record ,which holds the following - listener thread which pulls notifications from PG, and then finds next suitable record (or records) to process for given `queue-name` option - a ConcurrentLinkedQueue instance which is used as an internal queue representation to farily distribute individual payloads to multiple consumer threads (number is controlled by `concurrency` option - each job is processed by a `handler` function, which receives a map of `{id payload queue-name}` Consumer can be closed with `with-close` etc
(stop! consumer)
Stops the consumer, publishers are unstoppable
Stops the consumer, publishers are unstoppable
(valid-queue-name? q)
Ensure there is a queue name and that it doesn't contain . in the name
Ensure there is a queue name and that it doesn't contain . in the name
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close