zlacker

[return to "Postgres is a great pub/sub and job server (2019)"]
1. daenz+X9[view] [source] 2021-12-17 23:49:44
>>anonu+(OP)
Strong disagree on using a database as a message queue. This article[0] covers many of the reasons why. Summary: additional application complexity and doesn't scale well with workers.

0. https://www.cloudamqp.com/blog/why-is-a-database-not-the-rig...

EDIT>> I am not suggesting people build their own rabbitmq infrastructure. Use a cloud service. The article is informational only.

◧◩
2. simonw+jf[view] [source] 2021-12-18 00:28:23
>>daenz+X9
I'm increasingly of the opinion that relational databases are absolutely the right way to build queue systems for most projects.

One of the biggest advantages comes when you start thinking about them in terms of transactions. Transactional guarantees are really useful here: guarantee that a message will be written to the queue if the transaction commits successfully, and guarantee that a message will NOT be written to the queue otherwise.

https://brandur.org/job-drain describes a great pattern for achieving that using PostgreSQL transactions.

◧◩◪
3. daenz+9h[view] [source] 2021-12-18 00:41:26
>>simonw+jf
The transaction feature seems nice but how often is your application dropping queue messages because something happened between tx.commit() and queue.send(msg)? My experience has been that this is not an issue.
◧◩◪◨
4. travis+ns[view] [source] 2021-12-18 02:18:56
>>daenz+9h
I am SUPER worried about this when it affects something really important, like getting the client/customer/merchant/cardholder their money. It seems like the world has moved on without me —- “ohh, three nines is enough”… “hrmmm maybe?…”
[go to top]