-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
86 additions
and
52 deletions.
There are no files selected for viewing
50 changes: 25 additions & 25 deletions
50
src/Messaging/NBB.Messaging.Abstractions/NBB.Messaging.Abstractions.csproj
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup Label="Globals"> | ||
<SccProjectName>SAK</SccProjectName> | ||
<SccProvider>SAK</SccProvider> | ||
<SccAuxPath>SAK</SccAuxPath> | ||
<SccLocalPath>SAK</SccLocalPath> | ||
</PropertyGroup> | ||
<PropertyGroup Label="Globals"> | ||
<SccProjectName>SAK</SccProjectName> | ||
<SccProvider>SAK</SccProvider> | ||
<SccAuxPath>SAK</SccAuxPath> | ||
<SccLocalPath>SAK</SccLocalPath> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<Description>A few lightweight messaging abstractions</Description> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<Description>A few lightweight messaging abstractions</Description> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Remove="NBB.Messaging.Abstractions.csproj.vspscc" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Remove="NBB.Messaging.Abstractions.csproj.vspscc" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\Core\NBB.Core.Abstractions\NBB.Core.Abstractions.csproj" /> | ||
<ProjectReference Include="..\..\Core\NBB.Core.Pipeline\NBB.Core.Pipeline.csproj" /> | ||
<ProjectReference Include="..\..\Correlation\NBB.Correlation\NBB.Correlation.csproj" /> | ||
<ProjectReference Include="..\NBB.Messaging.DataContracts\NBB.Messaging.DataContracts.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\Core\NBB.Core.Abstractions\NBB.Core.Abstractions.csproj" /> | ||
<ProjectReference Include="..\..\Core\NBB.Core.Pipeline\NBB.Core.Pipeline.csproj" /> | ||
<ProjectReference Include="..\..\Correlation\NBB.Correlation\NBB.Correlation.csproj" /> | ||
<ProjectReference Include="..\NBB.Messaging.DataContracts\NBB.Messaging.DataContracts.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains 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
This file contains 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
29 changes: 29 additions & 0 deletions
29
src/Messaging/NBB.Messaging.Host/MessagingHostHealthCheck.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) TotalSoft. | ||
// This source code is licensed under the MIT license. | ||
|
||
using Microsoft.Extensions.Diagnostics.HealthChecks; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace NBB.Messaging.Host | ||
{ | ||
public class MessagingHostHealthCheck : IHealthCheck | ||
{ | ||
private readonly IMessagingHost _messagingHost; | ||
|
||
public MessagingHostHealthCheck(IMessagingHost messagingHost) | ||
{ | ||
_messagingHost = messagingHost; | ||
} | ||
|
||
public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) | ||
{ | ||
if (_messagingHost.IsRunning()) | ||
{ | ||
return Task.FromResult(HealthCheckResult.Healthy("MessagingHost is running.")); | ||
} | ||
|
||
return Task.FromResult(HealthCheckResult.Unhealthy("MessagingHost is not running.")); | ||
} | ||
} | ||
} |
55 changes: 28 additions & 27 deletions
55
src/Messaging/NBB.Messaging.Host/NBB.Messaging.Host.csproj
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,35 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<Description>Messaging subscriber host</Description> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<Description>Messaging subscriber host</Description> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.CSharp" Version="$(MicrosoftCSharpPackageVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Scrutor" Version="$(ScrutorPackageVersion)" /> | ||
<PackageReference Include="MediatR" Version="$(MediatRPackageVersion)" /> | ||
<PackageReference Include="Polly" Version="$(PollyVersion)" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.CSharp" Version="$(MicrosoftCSharpPackageVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsPackagesVersion)" /> | ||
<PackageReference Include="Scrutor" Version="$(ScrutorPackageVersion)" /> | ||
<PackageReference Include="MediatR" Version="$(MediatRPackageVersion)" /> | ||
<PackageReference Include="Polly" Version="$(PollyVersion)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\Core\NBB.Core.Abstractions\NBB.Core.Abstractions.csproj" /> | ||
<ProjectReference Include="..\..\Core\NBB.Core.Effects\NBB.Core.Effects.csproj" /> | ||
<ProjectReference Include="..\..\Core\NBB.Core.Pipeline\NBB.Core.Pipeline.csproj" /> | ||
<ProjectReference Include="..\..\Correlation\NBB.Correlation\NBB.Correlation.csproj" /> | ||
<ProjectReference Include="..\NBB.Messaging.Abstractions\NBB.Messaging.Abstractions.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\Core\NBB.Core.Abstractions\NBB.Core.Abstractions.csproj" /> | ||
<ProjectReference Include="..\..\Core\NBB.Core.Effects\NBB.Core.Effects.csproj" /> | ||
<ProjectReference Include="..\..\Core\NBB.Core.Pipeline\NBB.Core.Pipeline.csproj" /> | ||
<ProjectReference Include="..\..\Correlation\NBB.Correlation\NBB.Correlation.csproj" /> | ||
<ProjectReference Include="..\NBB.Messaging.Abstractions\NBB.Messaging.Abstractions.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute"> | ||
<_Parameter1>$(AssemblyName).Tests</_Parameter1> | ||
</AssemblyAttribute> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute"> | ||
<_Parameter1>$(AssemblyName).Tests</_Parameter1> | ||
</AssemblyAttribute> | ||
</ItemGroup> | ||
|
||
</Project> |