Skip to content

Add router-aware batched DLQ replay - #26

Merged
KilianBoute merged 6 commits into
mainfrom
feat/dlq-router-replay
Sep 17, 2026
Merged

KilianBoute merged 6 commits into
mainfrom
feat/dlq-router-replay

Conversation

@KilianBoute

@KilianBoute KilianBoute commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • record an optional replay destination in the provider-neutral dead-letter envelope
  • prefer explicit replay overrides, then the recorded router, then source fallback
  • add provider-managed replay batches with per-batch transformation, timeout, delay, and per-message skip support
  • keep retained messages out of later batches so each physical DLQ message is scanned once
  • report replay counts by destination, including skipped/unrecoverable messages
  • add confirmed raw RabbitMQ DLQ transfer support for sequence testing

Provider safety

  • RabbitMQ publishes with confirmation before acknowledging and restores retained deliveries once at the end
  • SQS sends before deleting, keeps retained messages invisible for the bounded run, and requires a timeout/deadline that fits its maximum visibility window
  • Kafka/Event Hubs publish before committing and block only the affected partition after a skipped message
  • transformation failures retain the current batch; successfully completed earlier batches remain replayed

Compatibility

  • existing uug.ai/dead-letter/v1 envelopes remain readable
  • legacy raw messages still require an explicit destination
  • the unbatched replay limit and behavior remain unchanged

Validation

  • GOWORK=off go test ./...
  • GOWORK=off CGO_ENABLED=0 go test ./...
  • GOWORK=off go vet ./...
  • GOWORK=off go build ./...
  • git diff --check

KilianBoute and others added 3 commits September 16, 2026 15:13
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.68286% with 142 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/queue/deadletter_rabbitmq.go 43.13% 47 Missing and 11 partials ⚠️
pkg/queue/deadletter_kafka.go 57.14% 22 Missing and 11 partials ⚠️
pkg/queue/deadletter_sqs.go 71.55% 19 Missing and 14 partials ⚠️
pkg/queue/deadletter.go 76.00% 12 Missing and 6 partials ⚠️

📢 Thoughts on this report? Let us know!

KilianBoute and others added 3 commits September 17, 2026 08:16
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@KilianBoute KilianBoute changed the title Route DLQ replays through configured routers Add router-aware batched DLQ replay Sep 17, 2026
@KilianBoute
KilianBoute merged commit c70308a into main Sep 17, 2026
5 checks passed
@KilianBoute
KilianBoute deleted the feat/dlq-router-replay branch September 17, 2026 09:44
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