|
1 | 1 | --- |
2 | 2 | title: Delivery and retries |
3 | | -description: Status handling, durable retries, endpoint disabling, history, and replay |
| 3 | +description: Status handling, durable retries, endpoint disabling, and destination security |
4 | 4 | --- |
5 | 5 |
|
6 | 6 | Spectrum delivers each event independently to every subscribed endpoint. A |
@@ -66,60 +66,15 @@ delivery lane. |
66 | 66 |
|
67 | 67 | If the four-day retry budget expires, Spectrum: |
68 | 68 |
|
69 | | -1. records the event as `dead_lettered`; |
| 69 | +1. moves the event to its internal dead-letter queue; |
70 | 70 | 2. disables the endpoint with reason `delivery_failures`; and |
71 | 71 | 3. sends an email if `failureNotificationEmail` is configured. |
72 | 72 |
|
73 | 73 | Re-enable the endpoint with `PATCH /projects/{projectId}/webhooks/{webhookId}` |
74 | 74 | and `{ "enabled": true }` after fixing it. Future events and any retries that |
75 | | -are still pending resume in endpoint order; terminal `dead_lettered` events |
76 | | -require an explicit replay. |
77 | | - |
78 | | -## Delivery history |
79 | | - |
80 | | -Terminal outcomes are retained for seven days: |
81 | | - |
82 | | -```sh |
83 | | -curl "https://spectrum.photon.codes/projects/$PROJECT_ID/webhooks/$WEBHOOK_ID/deliveries?limit=50" \ |
84 | | - -u "$PROJECT_ID:$PROJECT_SECRET" |
85 | | -``` |
86 | | - |
87 | | -Each row includes the event id, event type, platform, terminal outcome, |
88 | | -delivery count, final status or reason, timestamps, and whether replay is still |
89 | | -available. The history table stores metadata, not the webhook payload. |
90 | | - |
91 | | -Use `before` for cursor pagination and `outcome=dead_lettered` to show failed |
92 | | -deliveries only. |
93 | | - |
94 | | -## Manual replay |
95 | | - |
96 | | -Replay one failed event: |
97 | | - |
98 | | -```sh |
99 | | -curl -X POST \ |
100 | | - "https://spectrum.photon.codes/projects/$PROJECT_ID/webhooks/$WEBHOOK_ID/deliveries/$EVENT_ID/replay" \ |
101 | | - -u "$PROJECT_ID:$PROJECT_SECRET" |
102 | | -``` |
103 | | - |
104 | | -Or replay up to 100 failures from a time range no longer than seven days: |
105 | | - |
106 | | -```sh |
107 | | -curl -X POST \ |
108 | | - "https://spectrum.photon.codes/projects/$PROJECT_ID/webhooks/$WEBHOOK_ID/deliveries/replay-failures" \ |
109 | | - -u "$PROJECT_ID:$PROJECT_SECRET" \ |
110 | | - -H "Content-Type: application/json" \ |
111 | | - -d '{ |
112 | | - "since": "2026-08-01T00:00:00Z", |
113 | | - "until": "2026-08-02T00:00:00Z", |
114 | | - "limit": 100 |
115 | | - }' |
116 | | -``` |
117 | | - |
118 | | -Replay requires an enabled Fusor endpoint, a `dead_lettered` outcome, and the |
119 | | -original event to remain in the seven-day source-retention window. It preserves |
120 | | -the original `webhook-id`, signs the delivery with the endpoint's current |
121 | | -secret, and increments the history row's replay count. Your idempotency policy |
122 | | -therefore remains authoritative during replay. |
| 75 | +are still pending resume in endpoint order. Spectrum does not currently expose |
| 76 | +delivery history or manual replay, so reconcile terminal failures from your own |
| 77 | +source of truth. |
123 | 78 |
|
124 | 79 | ## Destination security |
125 | 80 |
|
|
0 commit comments