Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitAuto: [FEATURE] Upgrade RabbitMQ Client Library to Version 7.0.0 #639

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PackageVersion Include="NEST" Version="7.17.5" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NSubstitute" Version="5.3.0" />
<PackageVersion Include="RabbitMQ.Client" Version="6.8.1" />
<PackageVersion Include="RabbitMQ.Client" Version="7.0.0" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.4.0.108396" />
<PackageVersion Include="StackExchange.Redis" Version="2.8.24" />
<PackageVersion Include="StackExchange.Redis.Extensions.Core" Version="9.1.0" />
Expand All @@ -33,4 +33,4 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
</ItemGroup>
</Project>
</Project>
6 changes: 3 additions & 3 deletions Src/CrispyWaffle.RabbitMQ/Log/RabbitMQLogProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/// <summary>
/// The channel.
/// </summary>
private readonly IModel _channel;
private readonly IChannel _channel;

/// <summary>
/// The cancellation token.
Expand All @@ -55,8 +55,8 @@
public RabbitMQLogProvider(RabbitMQConnector connector, CancellationToken cancellationToken)
{
_connector = connector ?? throw new ArgumentNullException(nameof(connector));
_channel = _connector.ConnectionFactory.CreateConnection().CreateModel();
_channel.ExchangeDeclare(_connector.DefaultExchangeName, ExchangeType.Fanout, true);
_channel = _connector.ConnectionFactory.CreateConnectionAsync().GetAwaiter().GetResult().CreateModelAsync().GetAwaiter().GetResult();

Check failure on line 58 in Src/CrispyWaffle.RabbitMQ/Log/RabbitMQLogProvider.cs

View workflow job for this annotation

GitHub Actions / Deep Source Coverage report

'IConnection' does not contain a definition for 'CreateModelAsync' and no accessible extension method 'CreateModelAsync' accepting a first argument of type 'IConnection' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 58 in Src/CrispyWaffle.RabbitMQ/Log/RabbitMQLogProvider.cs

View workflow job for this annotation

GitHub Actions / Deep Source Coverage report

'IConnection' does not contain a definition for 'CreateModelAsync' and no accessible extension method 'CreateModelAsync' accepting a first argument of type 'IConnection' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 58 in Src/CrispyWaffle.RabbitMQ/Log/RabbitMQLogProvider.cs

View workflow job for this annotation

GitHub Actions / SonarCloud Analysis

'IConnection' does not contain a definition for 'CreateModelAsync' and no accessible extension method 'CreateModelAsync' accepting a first argument of type 'IConnection' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 58 in Src/CrispyWaffle.RabbitMQ/Log/RabbitMQLogProvider.cs

View workflow job for this annotation

GitHub Actions / SonarCloud Analysis

'IConnection' does not contain a definition for 'CreateModelAsync' and no accessible extension method 'CreateModelAsync' accepting a first argument of type 'IConnection' could be found (are you missing a using directive or an assembly reference?)
_channel.ExchangeDeclareAsync(_connector.DefaultExchangeName, ExchangeType.Fanout, true).GetAwaiter().GetResult();
_cancellationToken = cancellationToken;
_queue = new ConcurrentQueue<string>();
var thread = new Thread(Worker);
Expand Down Expand Up @@ -107,7 +107,7 @@
try
{
var body = Encoding.UTF8.GetBytes(message);
_channel.BasicPublish(_connector.DefaultExchangeName, string.Empty, null, body);

Check failure on line 110 in Src/CrispyWaffle.RabbitMQ/Log/RabbitMQLogProvider.cs

View workflow job for this annotation

GitHub Actions / Deep Source Coverage report

'IChannel' does not contain a definition for 'BasicPublish' and no accessible extension method 'BasicPublish' accepting a first argument of type 'IChannel' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 110 in Src/CrispyWaffle.RabbitMQ/Log/RabbitMQLogProvider.cs

View workflow job for this annotation

GitHub Actions / SonarCloud Analysis

'IChannel' does not contain a definition for 'BasicPublish' and no accessible extension method 'BasicPublish' accepting a first argument of type 'IChannel' could be found (are you missing a using directive or an assembly reference?)
}
catch (Exception e)
{
Expand All @@ -126,7 +126,7 @@
return;
}

_channel.Close();

Check failure on line 129 in Src/CrispyWaffle.RabbitMQ/Log/RabbitMQLogProvider.cs

View workflow job for this annotation

GitHub Actions / Deep Source Coverage report

'IChannel' does not contain a definition for 'Close' and no accessible extension method 'Close' accepting a first argument of type 'IChannel' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 129 in Src/CrispyWaffle.RabbitMQ/Log/RabbitMQLogProvider.cs

View workflow job for this annotation

GitHub Actions / SonarCloud Analysis

'IChannel' does not contain a definition for 'Close' and no accessible extension method 'Close' accepting a first argument of type 'IChannel' could be found (are you missing a using directive or an assembly reference?)
}

/// <summary>
Expand Down
Loading