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. __jem+Wj[view] [source] 2023-09-24 23:14:08
>>5id+k9
I'm not sure this is really an issue with transactionality as a single request can obviously be split up into multiple transactions, but rather that even if you correctly flag the email as pending/errored, you either need to process these manually, or have some other kind of background task that looks for them, at which point why not just process them asynchronously.
[go to top]