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
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 ![]()
(I’m using Oban in two production services for low-volume but important jobs)
sorentwo
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
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.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








