Duroxide PostgreSQL Provider
A PostgreSQL-based provider implementation for Duroxide, a durable task orchestration framework for Rust.
Note: See CHANGELOG.md for version history and breaking changes.
Installation
Add to your Cargo.toml:
[]
= "0.1"
Usage
use PostgresProvider;
use Worker;
async
Custom Schema
To isolate data in a specific PostgreSQL schema:
let provider = new_with_schema.await?;
Configuration
| Environment Variable | Description | Default |
|---|---|---|
DUROXIDE_PG_POOL_MAX |
Maximum connection pool size | 10 |
Features
- Automatic schema migration on startup
- Connection pooling via sqlx
- Custom schema support for multi-tenant isolation
- Full implementation of the Duroxide
ProviderandProviderAdmintraits - Poison message detection with attempt count tracking
- Lock renewal for long-running orchestrations and activities
- KV store — durable per-instance key-value state for orchestration coordination
- Orchestration stats introspection via
Client::get_orchestration_stats()
Latest Release (0.1.28)
- Updated to duroxide 0.1.27 with provider-side
get_instance_stats()support - Fixed deserialization error propagation:
read(),read_with_execution(), andread_history_with_execution_id()now surface malformed events asProviderError::permanent - Fixed
get_instance_statscarry_forward JSONB path and removed error-swallowingEXCEPTIONblock - Added 8 new validation tests (2 corrupted history + 6 stats)
- Added
sample_orchestration_statsandsample_kv_read_modify_write_countere2e coverage - See CHANGELOG.md for full version history
License
MIT License - see LICENSE for details.