Re: Design of a reliable task processing queue

From: auxsvr(at)gmail(dot)com
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Design of a reliable task processing queue
Date: 2025-01-19 16:06:12
Message-ID: 2686461.fDdHjke4Dd@linux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Saturday, 18 January 2025 12:44:07 EET Alex Burkhart wrote:
> Hey team,
>
> I'm looking for help to organize locks and transaction for a reliable task
> queue.
>
> REQUIREMENTS
>
> 1. Pending actions are persisted to a database. There's a trace once they
> are done.
> 2. Application workers pick actions one by one. At any given time, each
> action can be assigned to at most one worker (transaction).
> 3. If multiple actions have same "lock_id", only one of them is processed
> at the time. That has to be action with smallest id.

Why reinvent the wheel and not use production-ready code from projects such as que (Ruby), pgqueuer (Python)?
--
Regards,
Peter

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2025-01-19 16:16:23 Re: concatenating hstores in a group by?
Previous Message David G. Johnston 2025-01-19 15:28:32 concatenating hstores in a group by?