SQLStreams

the messaging platform that is just Postgres

You last visited on 9999-99-99 Show what's new since then

0463 — Cron concurrency is enforced at consume time by the key lease, never by the scheduler

Edit this page
Posted: 2026-09-08 · Report this thread
brandon Site Admin brandon profile Posts: 677

Context. A cron_job declares concurrency 'allow' or 'defer'. Overlap between a running request and a newly due one has to be prevented somewhere, and the key-lease machinery already prevents overlap for any keyed message at consume time.

Decision. The scheduler does not enforce concurrency at all. It stamps the job’s concurrency into MessageOptions on the produced request, and the shipped key_lease machinery enforces it at consume time, exactly as for any other keyed message.

Consequences. One enforcement point; the scheduler stays a dumb producer and never inspects delivery state. Rejected: scheduler-side last-message-resolved checks — a dual enforcement layer for overlap, which key_lease already owns.