-
Notifications
You must be signed in to change notification settings - Fork 16
SQLiteOptions
NuGet package: DotNetWorkQueue.Transport.SQLite
Options class: SqLiteMessageQueueTransportOptions
Namespace: DotNetWorkQueue.Transport.SQLite.Basic
The SQLite transport uses the local machine's clock for all time-dependent operations (delayed processing, expiration, heartbeat). If consumers run on multiple machines, their clocks should be synchronized.
SQLite has an EnableWalMode option (default: true) that turns on WAL (Write-Ahead Logging) journal mode. In WAL mode, readers do not block the writer and the writer does not block readers, improving throughput.
This setting only applies to file-based databases. In-memory databases ignore it.
createQueue.Options.EnableWalMode = false;All feature flags below are set at queue creation time via the creation class and cannot be changed after the queue exists. See SQLiteQueueCreationOptions for usage examples.
| Property | Type | Default | Notes |
|---|---|---|---|
EnablePriority |
bool |
false |
Adds a priority column |
EnableStatus |
bool |
true |
Required when EnableHeartBeat is true
|
EnableHeartBeat |
bool |
true |
Enables dead message recovery |
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 |
EnableMessageExpiration |
bool |
false |
RPC queues force this to true
|
EnableWalMode |
bool |
true |
SQLite-specific. Ignored for in-memory databases |
EnableHoldTransactionUntilMessageCommitted |
bool |
always false
|
Present in the interface but permanently disabled. SQLite does not support this feature. The setter is a no-op. |
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 |
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 |
See MessageHistory for details on history tracking behavior.
See SQLiteInMemoryDB for in-memory database usage.
For any issues please use the GitHub issues