Generalize EnableDeadLetterQueueRecovery to SQS and Azure Service Bus (#3103)#3106
Merged
Merged
Conversation
…#3103) RabbitMQ has long had a first-class native-DLQ -> durable-storage bridge via EnableDeadLetterQueueRecovery(). This brings the same one-call feature, with the same syntax, to Amazon SQS and Azure Service Bus so natively dead-lettered messages become queryable/replayable through IDeadLetters (and tools like CritterWatch) instead of being invisible in a broker DLQ. - SqsDeadLetterQueueListener: background service that drains the SQS dead letter queue(s) used by listeners (or explicit names) and writes each message into durable storage via MoveToDeadLetterStorageAsync. - AzureServiceBusDeadLetterQueueListener: drains BOTH the Wolverine-managed dead letter queue (buffered/durable endpoints) AND the native $DeadLetterQueue sub-queues (inline endpoints + ASB-native TTL/max-delivery), reading exception metadata from stamped headers or DeadLetterReason/ DeadLetterErrorDescription. - Shared Wolverine.Transports.DeadLetterRecoveredException implements IDeadLetterExceptionInfo so the original exception type is preserved in durable storage rather than the recovery wrapper. - Messages are only deleted/completed off the broker AFTER being safely persisted, so a transient storage outage never loses a dead letter. Docs: new "Recovering Native Dead Letters to Durable Storage" sections on the SQS, Azure Service Bus, and (previously undocumented) RabbitMQ dead letter queue pages, cross-linked. Tests: per-transport registration tests (no infra) plus end-to-end recovery integration tests verified locally against LocalStack + Postgres (SQS) and the Azure Service Bus emulator + Postgres (ASB). Closes #3103. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 15, 2026
This was referenced Jun 17, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3103.
Summary
RabbitMQ already has a first-class native-DLQ → durable-storage bridge via
EnableDeadLetterQueueRecovery(). This generalizes that feature — with the same syntax — to Amazon SQS and Azure Service Bus, so natively dead-lettered messages land inwolverine_dead_lettersand become queryable/replayable throughIDeadLettersand tools like CritterWatch, instead of being invisible in a broker DLQ.What it does
SqsDeadLetterQueueListener— background service that drains the SQS dead letter queue(s) used by listeners (or explicit names) and writes each message into durable storage viaMoveToDeadLetterStorageAsync. Original exception type/message come from the stamped failure headers.AzureServiceBusDeadLetterQueueListener— drains both the Wolverine-managed dead letter queue (where buffered/durable endpoints move failures) and the native$DeadLetterQueuesub-queues of every listening queue/subscription (inline endpoints + ASB-native TTL/max-delivery). Exception metadata comes from stamped headers or the nativeDeadLetterReason/DeadLetterErrorDescription.Wolverine.Transports.DeadLetterRecoveredException(core, shared) implementsIDeadLetterExceptionInfoso the original exception type is recorded in durable storage rather than the recovery wrapper.Documentation
New "Recovering Native Dead Letters to Durable Storage" sections on the SQS, Azure Service Bus, and (previously undocumented) RabbitMQ dead-letter-queue pages, cross-linked so the consistent syntax is discoverable from each transport.
Tests
Verification
wolverine.slnxRelease build clean (0 warnings / 0 errors).Pairs with
#3104 (per-endpoint dead-letter-destination contract) — filed/implemented separately.
🤖 Generated with Claude Code