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
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
## [4.0.1] - 2026-04-02
### *Changes
- Add optional exchangeType parameter to RabbitChannelConfiguration
## [4.0.0] - 2026-03-10
### *Changes (VERY Breaking)*
- Upgrade to RabbitMQ.Client to v7, target .net9
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>4.0.0</Version>
<Version>4.0.1</Version>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions src/RabbitChannelConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
string? dlqName = null,
string? dlxName = null,
bool createProducerChannel = true,
bool createConsumerChannel = true)
bool createConsumerChannel = true,
string exchangeType = ExchangeType.Direct)
: IAsyncDisposable
{
private readonly string dlqName = string.IsNullOrEmpty(dlqName) ? queueName : dlqName;
Expand All @@ -32,10 +33,10 @@
{
var factory = new ConnectionFactory
{
HostName = ConfigurationManager.Configuration["RABBIT_SERVER"],

Check warning on line 36 in src/RabbitChannelConfiguration.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Possible null reference assignment.

Check warning on line 36 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 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.
Password = ConfigurationManager.Configuration["RABBIT_PASSWORD"],

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.
Port = int.Parse(ConfigurationManager.Configuration["RABBIT_PORT"])

Check warning on line 39 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 39 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 All @@ -60,7 +61,7 @@

await setupChannel.ExchangeDeclareAsync(
this.Exchange,
ExchangeType.Direct,
exchangeType,
durableExchange,
cancellationToken: cancellationToken);

Expand Down Expand Up @@ -98,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