DotNetWorkQueue.Transport.PostgreSQL
0.11.0
dotnet add package DotNetWorkQueue.Transport.PostgreSQL --version 0.11.0
NuGet\Install-Package DotNetWorkQueue.Transport.PostgreSQL -Version 0.11.0
<PackageReference Include="DotNetWorkQueue.Transport.PostgreSQL" Version="0.11.0" />
<PackageVersion Include="DotNetWorkQueue.Transport.PostgreSQL" Version="0.11.0" />
<PackageReference Include="DotNetWorkQueue.Transport.PostgreSQL" />
paket add DotNetWorkQueue.Transport.PostgreSQL --version 0.11.0
#r "nuget: DotNetWorkQueue.Transport.PostgreSQL, 0.11.0"
#:package DotNetWorkQueue.Transport.PostgreSQL@0.11.0
#addin nuget:?package=DotNetWorkQueue.Transport.PostgreSQL&version=0.11.0
#tool nuget:?package=DotNetWorkQueue.Transport.PostgreSQL&version=0.11.0
DotNetWorkQueue.Transport.PostgreSQL
PostgreSQL transport for DotNetWorkQueue.
Features
- PostgreSQL message storage using Npgsql
- Supports delayed processing, message expiration, and priority queues
- Heartbeat monitoring for long-running messages
- Automatic table creation and schema management
- Job scheduling with deduplication
- Targets .NET 10.0, .NET 8.0, .NET Framework 4.8, .NET Standard 2.0
Installation
dotnet add package DotNetWorkQueue.Transport.PostgreSQL
Quick Start
// Producer
using var queueContainer = new QueueContainer<PostgreSqlMessageQueueInit>();
using var producer = queueContainer.CreateProducer<MyMessage>(
new QueueConnection("queueName", "Host=localhost;Database=MyDb;Username=user;Password=pass;"));
producer.Send(new MyMessage { Text = "Hello" });
// Consumer
using var consumer = queueContainer.CreateConsumer(
new QueueConnection("queueName", "Host=localhost;Database=MyDb;Username=user;Password=pass;"));
consumer.Start<MyMessage>(HandleMessage);
Performance tuning
Npgsql automatic statement preparation
Off by default in Npgsql, and this transport does not turn it on. The send path issues the same handful of statements repeatedly, which is the shape automatic preparation targets, so enabling it is worth considering — it is a connection-string change, not a code one:
Host=localhost;Database=MyDb;Username=user;Password=pass;Max Auto Prepare=20;Auto Prepare Min Usages=2;
Measured on this transport (net10, LAN PostgreSQL, 256-byte payload), across two runs:
| operation | effect |
|---|---|
| single send | no measurable difference |
| batch of 100 | 13-17% faster |
Allocation is unchanged. The benefit is on the batch path and only there — a single send showed a 6% gain in one run and none in another, which is noise rather than a small win. If you send one message at a time, this setting is not for you.
Before enabling it, know the trade-off. Prepared statements live on the physical connection and
the pool hands that connection back out, so dropping or recreating a table invalidates any prepared
statement referencing it. This library creates and drops queues as a normal operation, so that is
not a hypothetical. A create/drop/recreate cycle is covered by an integration test
(AutoPrepareSurvivesDdl) and does not fail — but Npgsql exposes no public counter for
auto-prepared statements, so that test shows the scenario working rather than proving the
invalidation path was exercised.
If your application creates and drops queues at runtime, measure your own workload before turning this on. If your queues are long-lived and you send in batches, it is close to free.
Documentation
License
LGPL-2.1-or-later
| 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 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. |
-
net10.0
- DotNetWorkQueue (>= 0.11.0)
- DotNetWorkQueue.Transport.RelationalDatabase (>= 0.11.0)
- Npgsql (>= 10.0.3)
- Polly.Core (>= 8.7.0)
-
net8.0
- DotNetWorkQueue (>= 0.11.0)
- DotNetWorkQueue.Transport.RelationalDatabase (>= 0.11.0)
- Npgsql (>= 10.0.3)
- Polly.Core (>= 8.7.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DotNetWorkQueue.Transport.PostgreSQL:
| Package | Downloads |
|---|---|
|
DotNetWorkQueue.Dashboard.Api
Dashboard API for DotNetWorkQueue - provides REST endpoints for monitoring and managing queues |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.11.0 | 0 | 9/7/2026 |
| 0.10.0 | 149 | 8/27/2026 |
| 0.9.43 | 312 | 7/7/2026 |
| 0.9.42 | 150 | 7/1/2026 |
| 0.9.41 | 154 | 6/30/2026 |
| 0.9.40 | 165 | 6/25/2026 |
| 0.9.39 | 161 | 6/23/2026 |
| 0.9.38 | 200 | 6/4/2026 |
| 0.9.37 | 201 | 5/28/2026 |
| 0.9.36 | 157 | 5/16/2026 |
| 0.9.35 | 203 | 4/23/2026 |
| 0.9.34 | 160 | 4/20/2026 |
| 0.9.32 | 169 | 4/16/2026 |
| 0.9.31 | 179 | 4/9/2026 |
| 0.9.30 | 158 | 4/8/2026 |
| 0.9.18 | 169 | 4/6/2026 |
| 0.9.14 | 232 | 4/3/2026 |
| 0.9.13 | 136 | 3/30/2026 |
| 0.9.12 | 139 | 3/29/2026 |
| 0.9.11 | 139 | 3/26/2026 |