-
Notifications
You must be signed in to change notification settings - Fork 16
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 agree on what time it is.
All feature flags below are set at queue creation time via the creation class and cannot be changed 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 creating the queue. The following constraints are enforced:
-
EnableHoldTransactionUntilMessageCommitted = truerequiresEnableHeartBeat = falseandEnableStatus = false -
EnableHeartBeat = truerequiresEnableStatus = true
See MessageHistory for details on history tracking behavior.
For any issues please use the GitHub issues