When not to use Stafett
Stafett is a webhook queue on your own Postgres. It is the wrong tool when:
- You need enqueue inside your own transaction.
POST /enqueueis a separate call after your commit, so a crash between the two loses the job. An outbox table in your own schema is the safer pattern there. - You need ordering. Jobs run concurrently and retries fall behind newer jobs.
- You need exactly-once. Delivery is at-least-once; receivers must dedupe
on
webhook-id, or, with signing off, on an id of your own. - Sustained throughput outgrows one Postgres primary. Every job is a few writes to your primary database. When that load is too much for it, use a broker such as SQS, Pub/Sub, RabbitMQ, or Kafka.
- The work is compute, not an HTTP call. Stafett delivers requests; it does not run your code.
- The enqueue API must be reachable from untrusted networks. It has no authentication yet.
- You already run Kafka or Temporal as the backbone. Keep the queue where the rest of the system is.