onkara

onkara

What's the difference between Oban and RabbitMQ

I am trying to wrap my head around the difference between Oban & RabbitMQ i.e. when does it make sense to use Oban vs RabbitMQ?

I know RabbitMQ is one extra component in your infrastructure requiring special config, monitoring etc so from that perspective Oban is easier to setup/monitor. But in terms of support for specific use cases or features which one would you choose and why?

Most Liked

chulkilee

chulkilee

If you just need a job processing and are already using PostgreSQl, I highly recommend using Oban. Message queue/broker, such as Kafka, RabbitMQ etc. can be used for job queueing but your application needs to handle complicated job specific features since they don’t have certain features handy (such as locking). There are many small gotchas you may hit if you write own job processing with job queue, especially ACID is required.

Message queue/broker have its own use cases - if you’re not sure probably you don’t need it :wink:

(I’m using Oban in two production services for low-volume but important jobs)

sorentwo

sorentwo

Oban Core Team

You have some great points in here. Oban is a background job processor, not a message queue or a kafka replacement.

Just to note, this changed completely in Oban 2.4, as now individual queues don’t poll the database at all. Instead, a single process manages scheduled jobs and uses notifications to notify queues that they have jobs to run.

sorentwo

sorentwo

Oban Core Team

RabbitMQ is purely a message broker, which is suitable for sending persistent messages between nodes. It doesn’t handle scheduling, retries, concurrency, testing concerns, or any of the other features Oban provides. To get some of those features you’ll need to use a library like Broadway, but it still won’t handle errors/retries/schedules/discards or provide the ability to query your data.

Regarding the performance, Oban can easily process 1-10k jobs per-queue per-node, depending on your concurrency levels.

Where Next?

Popular in Questions Top

_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lists...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New

Other popular topics Top

New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 41539 114
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39297 209
New

We're in Beta

About us Mission Statement