-
Notifications
You must be signed in to change notification settings - Fork 16
SqlServerOptions
NuGet package: DotNetWorkQueue.Transport.SqlServer
Options class: SqlServerMessageQueueTransportOptions
Namespace: DotNetWorkQueue.Transport.SqlServer.Basic
The SQL Server transport gets its time from GetUTCDate() on the server. No configuration needed. The server clock is always used for delayed processing, expiration, and heartbeat timestamps, so multiple app instances stay in sync.
All feature flags below are set at queue creation time via the creation class and cannot be changed after the queue exists. See SqlServerQueueCreationOptions 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