Disabling an endpoint that has failed for a week

Retrying forever against a dead endpoint is a queue that grows without bound, and disabling silently is worse than disabling loudly.

if ($endpoint->consecutiveFailureDays() >= 7) {
    $endpoint->disable();

    Mail::to($endpoint->owner)->send(new EndpointDisabled(
        $endpoint,
        $endpoint->lastFailureReason(),
        $this->reenableUrl($endpoint),
    ));
}

The re-enable link in the email is what stops this becoming a support ticket, and it should replay the backlog rather than starting from the next event — a subscriber who fixed their endpoint wants the week they missed. Whether to retain the backlog at all is a storage decision that has to be made before the first endpoint fails.