tushar
Hi ,
My requirement is I have to publish messages to Kafka based on events raised by my phoenix app , I am evaluating Oban to be aligned with the outbox pattern , our application will be deployed in 3 nodes in production with a single postgres DB to read/write from , the “outbox” or the Oban’s Repo will be hosted in the same DB.
My doubt is when it comes to multi node where all the Oban workers from the different nodes will be reading from the same table . whats the behaviour as in when all the 3 workers will read from the same table , will there be any chances of clash as in when all the 3 workers are reading the same event to publish ?
Or such a scenario is not at all possible ?
If it is possible is there any workaround/pattern available to avoid the same ?
Trending in Questions
Other Trending 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
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
egze
Workers will not process the same job simultaneously, so it is safe.
tushar
Thanks @egze , but how does it guarantee that , if you have a link to an article regarding it , that would help a lot.
mbuhot
You can see the code used to reserve jobs uses locks: https://github.com/sorentwo/oban/blob/master/lib/oban/query.ex#L21
This post explains the general technique:
tushar
Thanks a lot @mbuhot
benwilson512
Is this a duplicate of Oban - Reliable and Observable Job Processing - #226 by benwilson512 ?
tushar
Yeah Sorry for that @benwilson512