zlacker

[return to "Choose Postgres queue technology"]
1. 5id+k9[view] [source] 2023-09-24 21:33:48
>>bo0tzz+(OP)
One of the biggest benefits imo of using Postgres as your application queue, is that any async work you schedule benefits from transactionality.

That is, say you have a relatively complex backend mutation that needs to schedule some async work (eg sending an email after signup). With a Postgres queue, if you insert the job to send the email and then in a later part of the transaction, something fails and the transaction rollbacks, the email is never queued to be sent.

◧◩
2. matsem+jb[view] [source] 2023-09-24 21:52:13
>>5id+k9
Good point. We alleviate that a bit by scheduling our queue adds to not run until after commit. But then we still have some unsafety, and if connection to rabbit is down we're in trouble.
[go to top]