Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [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.
Comment on lines +3 to +6

## [6.0.0] - 2026-05-28
### *Changes (Breaking)*
- RabbitMessageRouter now takes `IServiceProvider` instead of `IEnumerable<IMessageHandler>` and creates a DI scope per received message. This ensures scoped services (e.g. DbContext) are fresh for each message, preventing stale tracked entities from leaking across messages.
Expand Down
2 changes: 1 addition & 1 deletion src/Linn.Common.Messaging.RabbitMQ.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyName>Linn.Common.Messaging.RabbitMQ</AssemblyName>
<PackageId>Linn.Common.Messaging.RabbitMQ</PackageId>
<Version>6.0.0</Version>
<Version>6.0.1</Version>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/RabbitChannelConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
{
var factory = new ConnectionFactory
{
HostName = ConfigurationManager.Configuration["RABBIT_SERVER"],

Check warning on line 37 in src/RabbitChannelConfiguration.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Possible null reference assignment.

Check warning on line 37 in src/RabbitChannelConfiguration.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Possible null reference assignment.
UserName = ConfigurationManager.Configuration["RABBIT_USERNAME"],

Check warning on line 38 in src/RabbitChannelConfiguration.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Possible null reference assignment.

Check warning on line 38 in src/RabbitChannelConfiguration.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Possible null reference assignment.
Password = ConfigurationManager.Configuration["RABBIT_PASSWORD"],

Check warning on line 39 in src/RabbitChannelConfiguration.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Possible null reference assignment.

Check warning on line 39 in src/RabbitChannelConfiguration.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Possible null reference assignment.
Port = int.Parse(ConfigurationManager.Configuration["RABBIT_PORT"])

Check warning on line 40 in src/RabbitChannelConfiguration.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Possible null reference argument for parameter 's' in 'int int.Parse(string s)'.

Check warning on line 40 in src/RabbitChannelConfiguration.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Possible null reference argument for parameter 's' in 'int int.Parse(string s)'.
};

this.Connection = await factory.CreateConnectionAsync(cancellationToken);
Expand Down Expand Up @@ -91,8 +91,7 @@

var args = new Dictionary<string, object>
{
{ "x-dead-letter-exchange", $"{this.dlxName}.dlx" },
{ "x-dead-letter-routing-key", string.Empty }
{ "x-dead-letter-exchange", $"{this.dlxName}.dlx" }
};

await setupChannel.QueueDeclareAsync(
Expand All @@ -100,7 +99,7 @@
durable: true,
exclusive: false,
autoDelete: false,
arguments: args,

Check warning on line 102 in src/RabbitChannelConfiguration.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Argument of type 'Dictionary<string, object>' cannot be used for parameter 'arguments' of type 'IDictionary<string, object?>' in 'Task<QueueDeclareOk> IChannel.QueueDeclareAsync(string queue, bool durable, bool exclusive, bool autoDelete, IDictionary<string, object?>? arguments = null, bool passive = false, bool noWait = false, CancellationToken cancellationToken = default(CancellationToken))' due to differences in the nullability of reference types.

Check warning on line 102 in src/RabbitChannelConfiguration.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Argument of type 'Dictionary<string, object>' cannot be used for parameter 'arguments' of type 'IDictionary<string, object?>' in 'Task<QueueDeclareOk> IChannel.QueueDeclareAsync(string queue, bool durable, bool exclusive, bool autoDelete, IDictionary<string, object?>? arguments = null, bool passive = false, bool noWait = false, CancellationToken cancellationToken = default(CancellationToken))' due to differences in the nullability of reference types.
cancellationToken: cancellationToken);

foreach (var routingKey in routingKeys)
Expand Down
Loading