Eternet.AspNetCore.Hangfire.PostgreSql 1.0.5

Prefix Reserved
dotnet add package Eternet.AspNetCore.Hangfire.PostgreSql --version 1.0.5
                    
NuGet\Install-Package Eternet.AspNetCore.Hangfire.PostgreSql -Version 1.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Eternet.AspNetCore.Hangfire.PostgreSql" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Eternet.AspNetCore.Hangfire.PostgreSql" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="Eternet.AspNetCore.Hangfire.PostgreSql" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Eternet.AspNetCore.Hangfire.PostgreSql --version 1.0.5
                    
#r "nuget: Eternet.AspNetCore.Hangfire.PostgreSql, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Eternet.AspNetCore.Hangfire.PostgreSql@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Eternet.AspNetCore.Hangfire.PostgreSql&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=Eternet.AspNetCore.Hangfire.PostgreSql&version=1.0.5
                    
Install as a Cake Tool

Eternet.AspNetCore.Hangfire.PostgreSql

Common Hangfire PostgreSQL registration for Eternet ASP.NET Core applications.

The package is storage-topology neutral. It configures Hangfire PostgreSQL consistently, but it does not decide whether a service uses an existing dedicated Hangfire database, the application database with a hangfire schema, or a custom connection factory. That decision belongs to each application's data plane.

Existing dedicated database

Use this when the application already has an operational Hangfire database and must preserve jobs, history, permissions, backup/restore boundaries, or pool budgets.

services.AddEternetHangfirePostgreSql(configuration, options =>
{
    options.ConnectionStringName = "HangfirePostgreSql";
    options.RegisterServer = true;
    options.WorkerCount = 2;
    options.Queues = ["default"];
});

Application database and schema

Use this only when the application explicitly owns Hangfire storage in its own database. Schema creation is opt-in so production DDL is not triggered by default.

services.AddEternetHangfirePostgreSql(configuration, options =>
{
    options.ConnectionStringName = "PostgreSql";
    options.SchemaName = "hangfire";
    options.PrepareSchemaIfNecessary = true;
    options.RegisterServer = true;
});

Custom connection handling

Applications can preserve a custom resolver, provide Hangfire's IConnectionFactory, or reuse an existing NpgsqlDataSource. The helper does not add or rewrite MaxPoolSize, MinPoolSize, or other pool parameters.

services.AddEternetHangfirePostgreSql(configuration, options =>
{
    options.ConnectionStringResolver = (serviceProvider, _) =>
        serviceProvider.GetRequiredService<IOptions<DatabaseSettings>>().Value.HangfireConnectionString;
});
services.AddEternetHangfirePostgreSql(configuration, options =>
{
    options.ConnectionFactoryResolver = (serviceProvider, _) =>
        serviceProvider.GetRequiredService<IConnectionFactory>();
});
services.AddEternetHangfirePostgreSql(configuration, options =>
{
    options.DataSourceResolver = (serviceProvider, _) =>
        serviceProvider.GetRequiredService<NpgsqlDataSource>();
});

Workers

RegisterServer defaults to false. Enable it only in hosts that should run Hangfire workers. WorkerCount = 2 and Queues = ["default"] are baseline values; applications should tune them per environment and account for the effective worker count across all running instances.

Control plane

Hangfire storage location is independent from Eternet.Mediator stateful commands and the future control plane. The control plane standardizes contracts, identity, execution, observability, and operation; it must not force the physical database used by Hangfire during the transition.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.5 94 9/11/2026
1.0.4 101 9/7/2026
1.0.3 143 8/13/2026
1.0.2 106 8/12/2026
1.0.1 687 7/14/2026
1.0.0 117 7/13/2026