Sparkdo.MassHub.Transport.Postgres 1.0.3

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Sparkdo.MassHub.Transport.Postgres --version 1.0.3
                    
NuGet\Install-Package Sparkdo.MassHub.Transport.Postgres -Version 1.0.3
                    
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="Sparkdo.MassHub.Transport.Postgres" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sparkdo.MassHub.Transport.Postgres" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Sparkdo.MassHub.Transport.Postgres" />
                    
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 Sparkdo.MassHub.Transport.Postgres --version 1.0.3
                    
#r "nuget: Sparkdo.MassHub.Transport.Postgres, 1.0.3"
                    
#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 Sparkdo.MassHub.Transport.Postgres@1.0.3
                    
#: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=Sparkdo.MassHub.Transport.Postgres&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Sparkdo.MassHub.Transport.Postgres&version=1.0.3
                    
Install as a Cake Tool

Sparkdo.MassHub.Transport.Postgres

Sparkdo 消息总线的 PostgreSQL 原生传输实现,使用数据库表作为消息队列,通过 LISTEN/NOTIFY 实现实时消息通知。

功能特性

  • 数据库原生传输:基于 PostgreSQL 表实现消息队列,无需额外消息代理
  • LISTEN/NOTIFY 实时通知:通过 PostgreSQL 的 LISTEN/NOTIFY 机制驱动消费者即时拉取
  • PostgresConnectionManager:管理 PostgreSQL 连接生命周期和连接池
  • PostgresConsumerManager:消费者注册与心跳维护,自动清理过期消费者
  • 自动 Schema 迁移:PostgresSchemaMigrator 自动创建和管理消息队列表结构
  • 后台任务调度:内置消息清理、孤立消息回收、队列溢出清理等维护任务
  • 可定制表结构:通过 PostgresSchemaOptions 自定义 Schema 名称和表名

安装

dotnet add package Sparkdo.MassHub.Transport.Postgres

使用示例

// 通过连接字符串快速配置
services.AddMessageBusHostedService(builder =>
    builder.AddPostgres("Host=localhost;Database=mydb;Username=postgres"));

// 完整配置
services.AddMessageBusHostedService(builder =>
{
    builder.AddPostgres(transport =>
    {
        transport.ConnectionString("Host=localhost;Database=mydb");
        transport.SchemaOptions(schema => schema.SchemaName = "MassHub");
    });
});
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.4-preview.3 86 6/8/2026
1.0.4-preview.2 64 6/7/2026
1.0.4-preview.1 78 6/7/2026
1.0.3 135 6/6/2026