joetjen.net
EN DE
← All libraries
Elixir

ordoq

A bounded, local, in-memory priority queue for asynchronous callbacks, with a supervised worker pool that starts with the dependency.

Intention

For process-local background work, and honest about what that means. Admission is finite: a full queue answers :overloaded instead of growing. Nothing is durable or shared between BEAM instances — work that must survive a restart belongs in RabbitMQ or the like. Retries are off by default, because a retry makes execution at-least-once.

Example
defmodule MailJob do
  def deliver(touch, recipient) do
    :ok = touch.(nil)
    send(recipient, :delivered)
  end
end

{:ok, job_id} = Ordoq.enqueue(MailJob, :deliver, [self()], priority: 5)
Install
{:ordoq, "~> 0.1"}
ElixirJob queueOTP