zlacker

[return to "Choose Postgres queue technology"]
1. aduffy+82[view] [source] 2023-09-24 20:41:49
>>bo0tzz+(OP)
For several projects I’ve opted for the even dumber approach, that works out of the box with every ORM/Query DSL framework in every language: using a normal table with SELECT FOR UPDATE SKIP LOCKED

https://www.pgcasts.com/episodes/the-skip-locked-feature-in-...

It’s not “web scale” but it easily extends to several thousand background jobs in my experience

◧◩
2. orange+r8[view] [source] 2023-09-24 21:27:19
>>aduffy+82
As I understand, with SKIP LOCKED rows would no longer be processed in-order?
◧◩◪
3. klysm+Ai[view] [source] 2023-09-24 22:59:27
>>orange+r8
Depends on how many consumers you have. If you need order guarantees, then something like the outbox pattern is probably a better fit.
◧◩◪◨
4. LennyW+7B[view] [source] 2023-09-25 02:43:32
>>klysm+Ai
Nothing about the outbox pattern guarantees ordering.
[go to top]