今日已更新 113 条资讯 | 累计 37664 条内容
关于我们

Digest Guarantees: How to Choose Public HTTPS Webhook Push, Subscribe, or Polling

jamesanderson3589 2026年08月31日 05:35 0 次阅读 来源:Dev.to

Short answer: for a small edtech SaaS sending a weekly digest in Europe and the US, persist one idempotent delivery job per customer and week, then start with a polling worker; adopt queue push or subscription delivery only when measured queue delay, regional isolation, or worker operations justify a public HTTPS receiver. The transport is not the guarantee. A public webhook can be retried, a subscriber can redeliver, and a polling loop can crash after sending but before recording success. In all three designs, the hard boundary is the same: a durable job identity, an atomic claim, an expiring lease, and a delivery operation that tolerates repetition. Get those right first. The easiest setup is then the one with the fewest independently failing parts your team must operate, not the one with the shortest quick-start page. This matters for a weekly digest because duplicates damage trust while an omitted message is difficult to notice. A customer who was active at the cutoff must map to a stable key such as customer_id + digest_week ; changing from polling to push must not change that identity. What delivery guarantee does the weekly digest actually need? “Exactly once” is an application outcome, not a useful promise to infer from a queue label. There are at least four moments to distinguish: eligibility is calculated, a job is committed, a worker claims it, and the downstream delivery system accepts it. A process can stop between any two writes. If it stops after acceptance but before the job is marked complete, retrying is the conservative action, and that retry can duplicate the digest unless the downstream operation accepts the same idempotency key. Write the contract before choosing a transport: Every active customer at the weekly cutoff gets one durable job. A job may be attempted more than once. The same digest_key is used on every attempt and is unique in the ledger. A claim expires, so a stopped worker cannot own work forever. Operators can distinguish pending

本文内容来源于互联网,版权归原作者所有
查看原文