Skip to content

feat: add dead letter queue with panic recovery#14

Merged
Raezil merged 1 commit into
mainfrom
feat/dead-letter-queue
May 21, 2026
Merged

feat: add dead letter queue with panic recovery#14
Raezil merged 1 commit into
mainfrom
feat/dead-letter-queue

Conversation

@Raezil
Copy link
Copy Markdown
Member

@Raezil Raezil commented May 21, 2026

Failed and panicking handlers are routed to an opt-in DeadLetterQueue (store.DLQ = GoEventBus.NewDeadLetterQueue()) instead of being silently counted in errorCount. Panics are wrapped as errors with errors.Is/As support and do not kill worker goroutines or the calling goroutine.

New API: DeadLetter struct, DeadLetterQueue with Len/Entries/Drain/Replay. Replay re-subscribes all entries, increments Attempts, and keeps entries that fail to re-enqueue. Recovery moved from worker() into execute() so sync-mode panics are also caught. README updated with full DLQ section.

Failed and panicking handlers are routed to an opt-in DeadLetterQueue
(store.DLQ = GoEventBus.NewDeadLetterQueue()) instead of being silently
counted in errorCount. Panics are wrapped as errors with errors.Is/As
support and do not kill worker goroutines or the calling goroutine.

New API: DeadLetter struct, DeadLetterQueue with Len/Entries/Drain/Replay.
Replay re-subscribes all entries, increments Attempts, and keeps entries
that fail to re-enqueue. Recovery moved from worker() into execute() so
sync-mode panics are also caught. README updated with full DLQ section.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Raezil Raezil merged commit bf36f58 into main May 21, 2026
1 check 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.

1 participant