Repository navigation
PostGreOptions
NuGet package: DotNetWorkQueue.Transport.PostgreSQL
Options class: PostgreSqlMessageQueueTransportOptions
Namespace: DotNetWorkQueue.Transport.PostgreSQL.Basic
The PostgreSQL transport gets its time from the PostgreSQL server, not the application host. If you have consumers on multiple machines, they all use the same time.
You set all of the feature flags below through the creation class when you create the queue. You cannot change them after the queue exists. See PostGreQueueCreationOptions for usage examples.
| Property | Type | Default | Notes |
|---|---|---|---|
EnablePriority |
bool |
false |
Adds a priority column. Higher-priority messages dequeue first |
EnableStatus |
bool |
true |
Required when EnableHeartBeat is true
|
EnableHeartBeat |
bool |
true |
Must be false when EnableHoldTransactionUntilMessageCommitted is true
|
EnableDelayedProcessing |
bool |
false |
Required for retry delays |
EnableStatusTable |
bool |
false |
Auto-set to true if AdditionalColumns are present |
EnableRoute |
bool |
false |
Tag messages with a route string for selective consumption |
EnableMessageExpiration |
bool |
false |
RPC queues force this to true
|
EnableHoldTransactionUntilMessageCommitted |
bool |
false |
Forces EnableHeartBeat and EnableStatus to false
|
EnableHistory |
bool |
false |
Creates a history table for message lifecycle tracking |
QueueType |
QueueTypes |
Normal |
Normal, RpcSend, or RpcReceive
|
AdditionalColumns |
ColumnList |
empty | Custom columns on the status or metadata table |
AdditionalConstraints |
ConstraintList |
empty | Custom indexes on user columns |
AdditionalColumnsOnMetaData |
bool |
false |
If true, user columns go on the metadata table instead of the status table |
When EnableHistory is true, the HistoryOptions property (type HistoryTransportOptions) controls retention:
| Property | Type | Default |
|---|---|---|
RetentionDays |
int |
30 |
MaxExceptionLength |
int |
4000 |
StoreBody |
bool |
false |
TrackEnqueue |
bool |
true |
TrackProcessing |
bool |
true |
TrackComplete |
bool |
true |
TrackError |
bool |
true |
TrackDelete |
bool |
true |
TrackExpire |
bool |
true |
MonitorTime |
TimeSpan |
1 day |
The options class runs ValidConfiguration() before the queue is created. It enforces these constraints:
-
EnableHoldTransactionUntilMessageCommitted = truerequiresEnableHeartBeat = falseandEnableStatus = false -
EnableHeartBeat = truerequiresEnableStatus = true
See MessageHistory for details on history tracking behavior.
For any issues please use the GitHub issues