Liking cljdoc? Tell your friends :D
Clojure only.

goose.broker

Defines protocol for Message Broker of Goose.

Defines protocol for Message Broker of Goose.
raw docstring

Brokercljprotocol

Protocol that message brokers should implement in order to facilitate transfers between producer & consumer, AKA application client & worker.

Protocol that message brokers should implement
in order to facilitate transfers between
producer & consumer, AKA application client & worker.
- [Guide to Message Broker Integration](https://github.com/nilenso/goose/wiki/Guide-to-Message-Broker-Integration)

scheduled-jobs-sizeclj

(scheduled-jobs-size this)

Returns count of Scheduled Jobs.

Returns count of Scheduled Jobs.

dead-jobs-find-by-patternclj

(dead-jobs-find-by-pattern this match? limit)

Finds a Dead Jobs by user-defined parameters.

Finds a Dead Jobs by user-defined parameters.

enqueued-jobs-deleteclj

(enqueued-jobs-delete this job)

Deletes given Job from its queue.

Deletes given Job from its queue.

scheduleclj

(schedule this schedule-epoch-ms job)

Schedules a Job for execution at given epoch-ms.

Schedules a Job for execution at given epoch-ms.

enqueued-jobs-find-by-idclj

(enqueued-jobs-find-by-id this queue id)

Finds a Job by :id in given queue.

Finds a Job by `:id` in given queue.

cron-jobs-deleteclj

(cron-jobs-delete this entry-name)

Deletes Cron Entry & Cron-Scheduled Job of given :name.

Deletes Cron Entry & Cron-Scheduled Job of given `:name`.

scheduled-jobs-find-by-idclj

(scheduled-jobs-find-by-id this id)

Finds a Scheduled Job by :id.

Finds a Scheduled Job by `:id`.

scheduled-jobs-deleteclj

(scheduled-jobs-delete this job)

Deletes given Scheduled Job.

Deletes given Scheduled Job.

enqueued-jobs-purgeclj

(enqueued-jobs-purge this queue)

Purges all the Jobs in given queue.

Purges all the Jobs in given queue.

dead-jobs-replay-n-jobsclj

(dead-jobs-replay-n-jobs this n)

Re-enqueues n oldest Dead Jobs to front of queue for execution.

Re-enqueues n oldest Dead Jobs to front of queue for execution.

enqueued-jobs-prioritise-executionclj

(enqueued-jobs-prioritise-execution this job)

Brings a Job anywhere in the queue to front of queue.

Brings a Job anywhere in the queue to front of queue.

dead-jobs-sizeclj

(dead-jobs-size this)

Returns count of Dead Jobs.

Returns count of Dead Jobs.

scheduled-jobs-purgeclj

(scheduled-jobs-purge this)

Purges all the Scheduled Jobs.

Purges all the Scheduled Jobs.

register-cronclj

(register-cron this cron-opts job-description)

Registers a function for periodic execution in cron-jobs style.

Registers a function for periodic execution in cron-jobs style.

enqueue-batchclj

(enqueue-batch this batch)

Enqueues a Batch of Jobs for async execution.

Enqueues a Batch of Jobs for async execution.

enqueueclj

(enqueue this job)

Enqueues a Job for async execution.

Enqueues a Job for async execution.

dead-jobs-popclj

(dead-jobs-pop this)

Pops the oldest Dead Job from the queue & returns it.

Pops the oldest Dead Job from the queue & returns it.

dead-jobs-replay-jobclj

(dead-jobs-replay-job this job)

Re-enqueues given Dead Job to front of queue for execution.

Re-enqueues given Dead Job to front of queue for execution.

batch-deleteclj

(batch-delete this id)

Deletes given Batch and its jobs.

Deletes given Batch and its jobs.

enqueued-jobs-find-by-patternclj

(enqueued-jobs-find-by-pattern this queue match? limit)

Finds a Job by user-defined parameters in given queue.

Finds a Job by user-defined parameters in given queue.

scheduled-jobs-prioritise-executionclj

(scheduled-jobs-prioritise-execution this job)

Enqueues a Job scheduled to run at anytime to front of queue.

Enqueues a Job scheduled to run at anytime to front of queue.

cron-jobs-purgeclj

(cron-jobs-purge this)

Purges all the Cron Entries & Cron-Scheduled Jobs.

Purges all the Cron Entries & Cron-Scheduled Jobs.

enqueued-jobs-sizeclj

(enqueued-jobs-size this queue)

Returns count of Jobs in given queue.

Returns count of Jobs in given queue.

dead-jobs-deleteclj

(dead-jobs-delete this job)

Deletes given Dead Job.

Deletes given Dead Job.

dead-jobs-delete-older-thanclj

(dead-jobs-delete-older-than this epoch-ms)

Deletes Dead Jobs older than given epoch-ms.

Deletes Dead Jobs older than given epoch-ms.

cron-jobs-sizeclj

(cron-jobs-size this)

Returns count of Periodic Jobs.

Returns count of Periodic Jobs.

scheduled-jobs-find-by-patternclj

(scheduled-jobs-find-by-pattern this match? limit)

Finds a Scheduled Jobs by user-defined parameters.

Finds a Scheduled Jobs by user-defined parameters.

start-workerclj

(start-worker this worker-opts)

Starts a worker process that does multiple things:

  • Dequeue & execute jobs from given queue
  • Enqueue scheduled jobs due for execution
  • Enqueue cron jobs due for execution
  • Retry failed jobs & mark them as dead when retries are exhausted
  • Run checks & replay orphan jobs
  • Send metrics around Job execution & state of message broker

Some tasks are message-broker specific & need not be implemented by all workers.
For instance, RabbitMQ natively supports scheduled jobs & orphan handling,
and it need not be explicitly implemented by its worker.

Starts a worker process that does multiple things:
- Dequeue & execute jobs from given queue
- Enqueue scheduled jobs due for execution
- Enqueue cron jobs due for execution
- Retry failed jobs & mark them as dead when retries are exhausted
- Run checks & replay orphan jobs
- Send metrics around Job execution & state of message broker

Some tasks are message-broker specific & need not be implemented by all workers.\
For instance, RabbitMQ natively supports scheduled jobs & orphan handling,\
and it need not be explicitly implemented by its worker.

cron-jobs-find-by-nameclj

(cron-jobs-find-by-name this entry-name)

Finds a Cron Entry by :name.

Finds a Cron Entry by `:name`.

batch-statusclj

(batch-status this id)

Finds a Batch by :id

Finds a Batch by `:id`

dead-jobs-find-by-idclj

(dead-jobs-find-by-id this id)

Finds a Dead Job by :id.

Finds a Dead Job by `:id`.

enqueued-jobs-list-all-queuesclj

(enqueued-jobs-list-all-queues this)

Lists all the queues.

Lists all the queues.

dead-jobs-purgeclj

(dead-jobs-purge this)

Purges all the Dead Jobs.

Purges all the Dead Jobs.
sourceraw docstring

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

× close