Description
The webhook delivery system has retry logic but no dead letter queue (DLQ). When a webhook delivery fails permanently (exhausts max attempts), the delivery record is marked as failed but the event data is lost. There is no way to replay failed deliveries.
Current behavior
Failed deliveries are marked with status='failed' and last_error. The payload is only stored in the delivery record and may be overwritten or cleaned up.
Expected behavior
- Store permanently failed deliveries in a DLQ (Redis sorted set or separate table)
- Include full payload, error history, and attempt details in DLQ entry
- Provide API endpoint to list DLQ entries
- Provide API endpoint to retry a DLQ entry (re-dispatch)
- Add TTL to DLQ entries for automatic cleanup
Suggested approach
Add a DLQ module that stores failed deliveries with full context. Add /webhooks/dlq GET and POST /webhooks/dlq/:id/retry endpoints. Use Redis sorted set with timestamp scores for efficient querying.
Labels
webhooks, api, feature
Description
The webhook delivery system has retry logic but no dead letter queue (DLQ). When a webhook delivery fails permanently (exhausts max attempts), the delivery record is marked as failed but the event data is lost. There is no way to replay failed deliveries.
Current behavior
Failed deliveries are marked with status='failed' and last_error. The payload is only stored in the delivery record and may be overwritten or cleaned up.
Expected behavior
Suggested approach
Add a DLQ module that stores failed deliveries with full context. Add /webhooks/dlq GET and POST /webhooks/dlq/:id/retry endpoints. Use Redis sorted set with timestamp scores for efficient querying.
Labels
webhooks, api, feature