Skip to content

feat: implement webhook delivery service with retry and signature verification (closes #111)#209

Merged
elizabetheonoja-art merged 1 commit into
Utility-Protocol:mainfrom
sandrawillow001-afk:feat/issue-111-webhook-delivery-service
Jul 21, 2026
Merged

feat: implement webhook delivery service with retry and signature verification (closes #111)#209
elizabetheonoja-art merged 1 commit into
Utility-Protocol:mainfrom
sandrawillow001-afk:feat/issue-111-webhook-delivery-service

Conversation

@sandrawillow001-afk

@sandrawillow001-afk sandrawillow001-afk commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements Issue #111 - Webhook Delivery Service with Retry and Signature Verification.

Changes

  • Restructures src/webhooks.rs into src/webhooks/ module (mod.rs, signer.rs, dispatcher.rs, dead_letter.rs)
  • Retry policy: fixed delays per spec (10s, 30s, 2min, 10min, 30min), max 5 retries
  • Permanent failures (non-retryable 4xx) returned immediately without DLQ
  • Transient failures retried with backoff, enqueued to DLQ after exhaustion
  • Rate limiting: 100 webhooks/min per endpoint via fixed-window counter
  • 10-second timeout per delivery attempt
  • 6 new API endpoints for webhook management
  • DB migration for webhook_endpoints and dead_letter_webhooks tables
  • Prometheus metrics for webhook deliveries, latency, and retries
  • Updated tests with mock DLQ
    closes Webhook Delivery Service with Retry and Signature Verification #111

…ification

Closes Utility-Protocol#111

- Restructure src/webhooks.rs into src/webhooks/ module:
  - mod.rs: shared types, RetryPolicy with configurable delays, WebhookTransport trait
  - signer.rs: HMAC-SHA256 signing and verification functions
  - dispatcher.rs: WebhookDeliveryService with 10s timeout, per-endpoint
    rate limiting (100/min), and exponential backoff retry (10s, 30s, 2min, 10min, 30min)
  - dead_letter.rs: DeadLetterQueue trait + PostgresDlq implementation

- Retry policy: fixed delays per spec (10s, 30s, 2min, 10min, 30min), max 5 retries
- Permanent failures (non-retryable 4xx) returned immediately without DLQ
- Transient failures retried with backoff, enqueued to DLQ after exhaustion
- Rate limiting: 100 webhooks/min per endpoint via fixed-window counter
- 10-second timeout per delivery attempt

- Add webhook management API endpoints:
  - GET/POST /api/v1/webhooks/endpoints
  - DELETE /api/v1/webhooks/endpoints/:id
  - POST /api/v1/webhooks/endpoints/:id/test
  - GET /api/v1/webhooks/dead-letter
  - POST /api/v1/webhooks/dead-letter/:id/retry

- Add DB migration for webhook_endpoints and dead_letter_webhooks tables
- Add Prometheus metrics for webhook deliveries, latency, and retries
- Update webhook tests to use new module structure and mock DLQ
@elizabetheonoja-art
elizabetheonoja-art merged commit a08584a into Utility-Protocol:main Jul 21, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webhook Delivery Service with Retry and Signature Verification

2 participants