You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add exponential backoff retry with DLQ support (Vibe Kanban) (#34)
* All tasks are complete. Here's a summary of the changes made:
## Summary of Changes
### New Features
1. **Exponential Backoff Retry Strategy**
- Added `RetryStrategy` type: `(retryCount: number) => number`
- Default strategy: exponential backoff with 1s base, 60s max
- Customizable via `retryStrategy` option per event
2. **Retry Counter & DLQ**
- Added `retryCount` field to track retry attempts
- Added `status` field (`'pending' | 'dlq'`)
- Events move to DLQ after `maxRetries` (default: 5) failures
### Naming Improvements
- `expiresAtTTL` → `retentionPeriod`
- `retryEveryMilliseconds` → `pollingInterval`
- `maxOutboxTransportEventPerRetry` → `maxEventsPerPoll`
- `maxExecutionTimeTTL` → `maxExecutionTime`
- `readyToRetryAfterTTL` → replaced by `retryStrategy`
### Files Modified
- **Core**: `outbox-transport-event.interface.ts`, `outbox.module-definition.ts`, `retryable-outbox-event.poller.ts`, `transactional-event-emitter.ts`
- **MikroORM**: Model, driver, and new migration `MigrationOutbox1734900000.ts`
- **TypeORM**: Model, driver, and new migration `MigrationOutbox1734900000.ts`
- **Tests**: All unit and integration tests updated
- **Documentation**: All README files updated
### Build & Tests
- Build passes for all packages
- 58 unit tests pass
* Good question. Let me think through the options:
| Status | Pros | Cons |
|--------|------|------|
| `failed` | Clear meaning, standard term | Might imply permanent failure (could be retried manually?) |
| `dlq` | Industry standard term (Dead Letter Queue) | Abbreviation, less readable |
| `dead` | Short, clear | Might sound too dramatic |
| `exhausted` | Describes what happened (retries exhausted) | Longer, less common |
| `abandoned` | Clear meaning | Implies we gave up, not that it failed |
My recommendation: **`dead`** or keep **`failed`**
- `dead` is concise and matches "Dead Letter Queue" concept
- `failed` is clearer for developers who don't know DLQ terminology
`cancelled` doesn't fit well because the event wasn't cancelled - it failed after max retries.
What's your preference? I can quickly rename if you'd like to use `dead` instead.
* fix(test): convert bigint to number in attemptAt assertion
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: increase default maxRetries from 5 to 10
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments