Repository navigation
remove x-dead-letter-routing-key to preserve original routing key on … - #9
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the RabbitMQ queue declaration logic to stop overriding the dead-letter routing key, so that messages retain their original routing key when dead-lettered (supporting correct requeue/back-routing behavior). It also bumps the package version and documents the change in the changelog.
Changes:
- Remove
x-dead-letter-routing-keyfrom main queue arguments so RabbitMQ preserves the original routing key on dead-lettering. - Bump NuGet package version to
6.0.1. - Add a
6.0.1changelog entry including an operational/deployment note about recreating existing queues.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/RabbitChannelConfiguration.cs | Removes the x-dead-letter-routing-key argument from the declared queue to preserve original routing keys on dead-letter. |
| src/Linn.Common.Messaging.RabbitMQ.csproj | Increments the package version from 6.0.0 to 6.0.1. |
| changelog.md | Documents the behavior change and notes the need to recreate queues to avoid 406 precondition failures. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+3
to
+6
| ## [6.0.1] - 2026-08-25 | ||
| ### *Bug Fix* | ||
| - Remove `x-dead-letter-routing-key` from main queue arguments. Previously set to `""`, this caused RabbitMQ to overwrite the original routing key on dead-letter, making messages unroutable when requeued from the DLQ back to the original exchange. The original routing key is now preserved automatically. | ||
| - **Deployment note:** Any existing `.q` queue declared with this library must be deleted and recreated for this change to take effect. RabbitMQ will throw 406 PRECONDITION_FAILED if the queue already exists with the old arguments. |
richardiphillips
approved these changes
Aug 25, 2026
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.
…dead letter