Description
An Active Job compatible queueing interface. This library will allow you to
enqueue jobs on your existing Active Job compatible backend. This is particularly
useful if you're strangling your existing Rails project to death.
The intention is to fully support any and all backends that Active Job supports.
Pull requests are much appreciated.
ActiveJorb alternatives and similar packages
Based on the "Queue" category.
Alternatively, view ActiveJorb alternatives based on common mentions on social networks and blogs.
-
kaffe
An opinionated Elixir wrapper around brod, the Erlang Kafka client, that supports encrypted connections to Heroku Kafka out of the box. -
task_bunny
TaskBunny is a background processing application written in Elixir and uses RabbitMQ as a messaging backend -
hulaaki
DISCONTINUED. DEPRECATED : An Elixir library (driver) for clients communicating with MQTT brokers(via the MQTT 3.1.1 protocol). -
adap
Create a data stream across your information systems to query, augment and transform data according to Elixir matching rules. -
exdisque
Elixir client for Disque (https://github.com/antirez/disque), an in-memory, distributed job queue.
CodeRabbit: AI Code Reviews for Developers
Do you think we are missing an alternative of ActiveJorb or a related project?
README
ActiveJorb
An Active Job compatible queueing interface. This library will allow you to enqueue jobs on your existing Active Job compatible backend. This is particularly useful if you're strangling your existing Rails project to death.
The intention is to fully support any and all backends that Active Job supports. Pull requests are much appreciated.
Installation
def deps do
[
{:active_jorb, "~> 0.1.0"}
]
end
Supported Backends
Backend | Supported? | Add to mix.exs | Link |
---|---|---|---|
Sidekiq | Yes | {:sidewalk, "~> 0.3.4} |
https://hex.pm/packages/sidewalk |
Resque | No (#6) | ||
Que | No (#4) | ||
Queue Classic | No (#5) | ||
Backburner | No (#3) | ||
Sneakers | No (#7) |
Usage
After installing the dependency for your required backend, it's recommended that you proxy access to the supported queue adapter in your application:
# config/dev.exs
config :my_application, MyApplication,
job_queue_adapter: ActiveJorb.QueueAdapter.Sidekiq
# config/test.exs
config :my_application, MyApplication,
job_queue_adapter: ActiveJorb.QueueAdapter.Test
# lib/my_application/job_queue.ex
defmodule MyApplication.JobQueue do
@queue_adapter Application.get_env(:my_application, :job_queue_adapter)
defdelegate enqueue(job), to: @queue_adapter
defdelegate enqueue_at(job), to: @queue_adapter
end
To enqueue a job you must first construct an %ActiveJorb.Job{}
, and then pass
it to the enqueue method of choice:
iex> job = %ActiveJorb.Job{job_class: "MyJob", arguments: [1, 2, 3]}
iex> MyApplication.JobQueue.enqueue(job)
{:ok, "some-job-id"}
iex> ts = ~N[2019-01-01 12:30:00]
iex> MyApplication.JobQueue.enqueue_at(job, ts)
{:ok, "some-other-job-id"}
Testing
See ActiveJorb.QueueAdapters.Test
.
Prior Art, Credit, and Thanks
- All of the maintainers of Active Job
- The various authors of any supported backend
- The various authors of any Elixir library supporting those backends