Liking cljdoc? Tell your friends :D

tech.queue.protocols


default-create-optionsclj


PCoreLimitcljprotocol

core-countclj

(core-count this msg)

How many cores will this message take to process

How many cores will this message take to process

QueueProcessorcljprotocol

msg->log-contextclj

(msg->log-context this msg)

Given a message return a map of context that should be included with every log message

Given a message return a map of context that should be included with every log message

msg-ready?clj

(msg-ready? this msg)

Boolean as to whether the system is ready to process this message. Defaults to (constantly true)

Boolean as to whether the system is ready to process this message.  Defaults to (constantly
true)

process!clj

(process! this msg)

Process this message. Errors are captured and logged and the message will be retried until its ttl is up. This must return a map that contains: {:status - one of :error, :not-ready? :success :msg - an updated message. }

Process this message.  Errors are captured and logged and the message will be retried until
    its ttl is up.
This must return a map that contains:
{:status - one of :error, :not-ready? :success
 :msg - an updated message.
}

retire!clj

(retire! this msg last-attempt-result)

Return a message. If the last time the system attempted to process this message then the error returned is captured in last-exception. last-attempt-result: { :status - :not-ready? or :error :error - last error returned due to processing }

Return a message.  If the last time the system attempted to process this message then the
    error returned
is captured in last-exception.
last-attempt-result:
{
 :status - :not-ready? or :error
 :error - last error returned due to processing
}

QueueProtocolcljprotocol

complete!clj

(complete! this task options)

msg->birthdateclj

(msg->birthdate this msg)

put!clj

(put! this msg options)

statsclj

(stats this options)

take!clj

(take! this options)

take should return the value :timeout if the receive has timed out. Else it should return the next task in the queue

take should return the value :timeout *if* the receive has timed out.
Else it should return the next task in the queue

task->msgclj

(task->msg this task)

QueueProvidercljprotocol

delete-queue!clj

(delete-queue! this queue-name options)

get-or-create-queue!clj

(get-or-create-queue! this queue-name options)

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

× close