4 ms·
With listen and notify in Postgres, it's a fantastic choice for a job queue if you're not crazy scale (which is most apps, honestly). Especially with transacti
by thejosh 5y ago
With listen and notify in Postgres, it's a fantastic choice for a job queue if you're not crazy scale (which is most apps, honestly).
Especially with transactions as mentioned, with elixir and ecto and Oban, you can ensure your jobs are inserted properly. And it's easily testable.
- jdc0589 5y agoI have strong opinions on this, but IMO if you are thinking about using PG pub/sub, you'd almost always be better served by just running a worker that reads from a logical replication slot. Little bit heavier lift, but there's plenty of reference code out there, and you get consistency + delivery guarantees.