4 ms·
Listen/notify doesn't queue messages if the listener isn't online, so isn't usually appropriate as a work queue. I encourage everyone to challenge the conventi
by smilliken 10y ago
Listen/notify doesn't queue messages if the listener isn't online, so isn't usually appropriate as a work queue.
I encourage everyone to challenge the conventional wisdom that using postgresql as a work queue is an anti-pattern. I've never found a queing software, out of countless options, that I was satisfied with. In concept, a queue is very simple. In practice, I've never seen the end of messy real world constraints that need to be imposed on queues.
We have somewhere around 50-100 queues in postgresql databases at MixRank, nearly all of them with millions of records or more, being hammered constantly. We get transactional consistency, automatic insertion with triggers, expression and partial indexes for prioritization and partitioning, joins, constraints and foreign keys, and everything else that comes with postgresql. It works great.
- einhverfr 10y agoAlso if your queue takes a month to clear because you bulk inserted a few hundred million jobs..... Listen/Notify isn't going to help you.
- manigandham 10y agoHave you tried AMPS: http://www.crankuptheamps.com/ http://www.crankuptheamps.com/