DEV Community

Tillping for Tillping

Posted on

Send duplicates at the same time

Replaying a webhook twice in sequence can miss the race that breaks fulfillment.

Deliver the same event concurrently in a test environment. Both handlers might check "already processed?" before either saves the answer. Now both grant credits.

Use an atomic claim, such as a database uniqueness constraint, and commit the local business change consistently with the processing record. External actions need their own protection against repeats.

Test out-of-order events separately. An event ID identifies a delivery; it doesn't tell you which subscription state is current.

Top comments (0)