- Updated `mapping-service` to include WEB3-ETH-IBAN support, health check endpoint, and improved error handling for account-wallet linking. - Added new provider connection and status endpoints in `mapping-service`. - Enhanced `orchestrator` service with health check, trigger management endpoints, and improved error handling for trigger validation and submission. - Updated dependencies in `package.json` for both services, including `axios`, `uuid`, and type definitions. - Improved packet service with additional validation and error handling for packet generation and dispatching. - Introduced webhook service enhancements, including delivery retries, dead letter queue management, and webhook management endpoints.
46 lines
1.2 KiB
Markdown
46 lines
1.2 KiB
Markdown
# Webhook Service
|
|
|
|
Webhook delivery service with retry logic and dead letter queue.
|
|
|
|
## Features
|
|
|
|
- Webhook registration and management
|
|
- Event-based webhook delivery
|
|
- Exponential backoff retry logic
|
|
- Dead letter queue (DLQ) for failed deliveries
|
|
- HMAC-SHA256 payload signing
|
|
- Delivery attempt tracking
|
|
|
|
## API Endpoints
|
|
|
|
- `POST /v1/webhooks` - Create webhook
|
|
- `GET /v1/webhooks/:id` - Get webhook
|
|
- `GET /v1/webhooks` - List webhooks
|
|
- `PATCH /v1/webhooks/:id` - Update webhook
|
|
- `DELETE /v1/webhooks/:id` - Delete webhook
|
|
- `POST /v1/webhooks/:id/test` - Test webhook
|
|
- `POST /v1/webhooks/:id/replay` - Replay webhooks
|
|
- `GET /v1/webhooks/:id/attempts` - Get delivery attempts
|
|
- `GET /v1/webhooks/dlq` - List DLQ entries
|
|
- `POST /v1/webhooks/dlq/:id/retry` - Retry DLQ entry
|
|
|
|
## Retry Logic
|
|
|
|
- Max retries: 3
|
|
- Exponential backoff: 1s, 2s, 4s
|
|
- Failed deliveries moved to DLQ after max retries
|
|
|
|
## Webhook Signing
|
|
|
|
Webhooks can be signed with HMAC-SHA256 using a secret:
|
|
- Header: `X-Webhook-Signature`
|
|
- Algorithm: HMAC-SHA256
|
|
- Secret: Provided during webhook creation
|
|
|
|
## Configuration
|
|
|
|
- `REST_API_URL` - Main REST API URL
|
|
- `KAFKA_BROKERS` or `NATS_URL` - Event bus connection
|
|
- `DLQ_RETENTION_DAYS` - DLQ retention period (default: 30)
|
|
|