Bnsights.MicroServices.SharedLibrary
1.0.40
dotnet add package Bnsights.MicroServices.SharedLibrary --version 1.0.40
NuGet\Install-Package Bnsights.MicroServices.SharedLibrary -Version 1.0.40
<PackageReference Include="Bnsights.MicroServices.SharedLibrary" Version="1.0.40" />
<PackageVersion Include="Bnsights.MicroServices.SharedLibrary" Version="1.0.40" />
<PackageReference Include="Bnsights.MicroServices.SharedLibrary" />
paket add Bnsights.MicroServices.SharedLibrary --version 1.0.40
#r "nuget: Bnsights.MicroServices.SharedLibrary, 1.0.40"
#:package Bnsights.MicroServices.SharedLibrary@1.0.40
#addin nuget:?package=Bnsights.MicroServices.SharedLibrary&version=1.0.40
#tool nuget:?package=Bnsights.MicroServices.SharedLibrary&version=1.0.40
Bnsights.Microservices.SharedLibrary
Overview
This NuGet package contains a suite of shared libraries used across multiple microservices in the TDRA ecosystem, focused on standardizing and simplifying cross-cutting concerns such as:
- Database initialization and seeding
- RabbitMQ messaging
- Consul service discovery and configuration
- Hangfire job scheduling
- Common interfaces, entities, and extension methods
- Centralized logging and reusable utilities
🛑 Important Note:
This shared library depends onTDRA.Protos.dll
(built from.proto
files).
You must manually buildTDRA.Protos.csproj
before publishing or consuming this package, as it is not part of this solution and changes frequently.
Make sure it's built and present in../gRPC/TDRA.Protos/TDRA.Protos/bin/Debug/net8.0/TDRA.Protos.dll
.
Solution Structure
The main project to publish is:
TDRA.Microservices.Shared.SharedLibrary
— this project references all others and should be published as the NuGet package.
Referenced modules include:
TDRA.Microservices.Shared.Consul
TDRA.Microservices.Shared.RabbitMQ
TDRA.Microservices.Shared.HangfireJobs
TDRA.Microservices.Shared.Sql
TDRA.Microservices.Shared.UnifiedUserContext
Features
🗃️ Shared Database Initialization
IDatabaseInitializer.Initialize()
— runs EF Core migrations and optional seeding logic- Accepts
ILogger<T>
— supports centralized, microservice-level logging
🐇 RabbitMQ Integration
- Publisher/consumer setup using
IRabbitMQPublisher
andRabbitMQConsumerService<T>
- Configurable exchanges, queues, and routing keys
🧭 Consul Integration
- Service registration and dynamic configuration using
Winton.Extensions.Configuration.Consul
- Health check endpoint:
/health
⏱ Hangfire Job Scheduling
- Easily integrate recurring or background jobs using
JobsLogic
- Register Hangfire with:
builder.Services.AddHangfireServices(configuration["ConnectionStrings:ClientAppContext_DB"]); app.UseHangFire(); ## Version 1.0.13
Localization Enhancements
- Caching: Implemented a robust caching mechanism for localization resources to significantly improve performance.
- Client Logic Interface: Introduced a new interface for client-side localization logic, providing a standardized way to handle localizations.
- New Registration Method: Added the
RegisterLocalizationsAsync
method.- Action Required: This method must be called during the startup sequence of any new microservice to ensure the localization cache is populated correctly.
Version 1.0.24
✨ Observability & Centralized Logging
- Enhanced Logging: Added comprehensive logging logic directly into each service file, ensuring standardized log generation across all microservices.
- Elasticsearch Integration: Logs are now written directly to Elasticsearch, enabling powerful searching, analysis, and visualization in Kibana.
- Distributed Tracing: Implemented full observability by writing traces to both Jaeger and Elasticsearch, providing deep insights into request flows and performance bottlenecks.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Autofac (>= 8.3.0)
- Autofac.Extensions.DependencyInjection (>= 10.0.0)
- Consul (>= 1.7.14.7)
- EntityFramework (>= 6.5.1)
- Google.Protobuf (>= 3.31.1)
- Grpc.Net.Client (>= 2.71.0)
- Hangfire (>= 1.8.20)
- JetBrains.Annotations (>= 2024.3.0)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 8.0.19)
- Microsoft.AspNetCore.DataProtection.Abstractions (>= 8.0.4)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.0)
- Microsoft.AspNetCore.Routing (>= 2.3.0)
- Microsoft.Data.SqlClient (>= 6.0.2)
- Microsoft.EntityFrameworkCore (>= 8.0.5)
- Microsoft.EntityFrameworkCore.Proxies (>= 8.0.4)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.4)
- Microsoft.EntityFrameworkCore.SqlServer (>= 8.0.4)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Hosting (>= 8.0.1)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.9.0)
- OpenTelemetry.Extensions.Hosting (>= 1.9.0)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.9.0)
- OpenTelemetry.Instrumentation.GrpcNetClient (>= 1.8.0-beta.1)
- OpenTelemetry.Instrumentation.Http (>= 1.9.0)
- RabbitMQ.Client (>= 6.4.0)
- Serilog (>= 4.2.0)
- Serilog.AspNetCore (>= 8.0.3)
- Serilog.Enrichers.Environment (>= 3.0.0)
- Serilog.Enrichers.Process (>= 3.0.0)
- Serilog.Enrichers.Thread (>= 4.0.0)
- Serilog.Exceptions (>= 8.4.0)
- Serilog.Sinks.Console (>= 6.0.0)
- Serilog.Sinks.Elasticsearch (>= 10.0.0)
- Serilog.Sinks.File (>= 5.0.0)
- Serilog.Sinks.OpenTelemetry (>= 4.2.0)
- System.CodeDom (>= 9.0.4)
- System.Linq (>= 4.3.0)
- Winton.Extensions.Configuration.Consul (>= 3.4.0)
- Z.EntityFramework.Plus.EFCore (>= 8.103.8.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.40 | 156 | 8/28/2025 |
1.0.39 | 184 | 8/26/2025 |
1.0.38 | 171 | 8/26/2025 |
1.0.37 | 135 | 8/25/2025 |
1.0.36 | 125 | 8/18/2025 |
1.0.35 | 115 | 8/18/2025 |
1.0.34 | 121 | 8/18/2025 |
1.0.33 | 120 | 8/18/2025 |
1.0.32 | 114 | 8/17/2025 |
1.0.31 | 146 | 8/13/2025 |
1.0.30 | 340 | 8/7/2025 |
1.0.29 | 196 | 8/7/2025 |
1.0.28 | 191 | 7/28/2025 |
1.0.27 | 182 | 7/26/2025 |
1.0.26 | 215 | 7/26/2025 |
1.0.25 | 220 | 7/26/2025 |
1.0.24 | 216 | 7/26/2025 |
1.0.23 | 380 | 7/21/2025 |
1.0.22 | 374 | 7/21/2025 |
1.0.21 | 208 | 7/20/2025 |
1.0.20 | 194 | 7/20/2025 |
1.0.19 | 194 | 7/20/2025 |
1.0.18 | 193 | 7/20/2025 |
1.0.17 | 126 | 7/17/2025 |
1.0.16 | 133 | 7/17/2025 |
1.0.15 | 126 | 7/17/2025 |
1.0.14 | 141 | 7/17/2025 |
1.0.13 | 136 | 7/16/2025 |
1.0.12 | 228 | 7/14/2025 |
1.0.11 | 133 | 7/13/2025 |
1.0.9 | 182 | 7/7/2025 |
1.0.8 | 184 | 6/23/2025 |
1.0.7 | 180 | 6/19/2025 |
1.0.6 | 150 | 6/19/2025 |
1.0.5 | 149 | 6/18/2025 |
1.0.4 | 148 | 6/18/2025 |
1.0.3 | 147 | 6/18/2025 |
1.0.2 | 146 | 6/18/2025 |
1.0.1 | 165 | 6/17/2025 |
1.0.0 | 145 | 6/17/2025 |