Skip to content

LiteDbOptions

Brian Lehnen edited this page Apr 8, 2026 · 4 revisions

LiteDb Options

NuGet package: DotNetWorkQueue.Transport.LiteDb

Options class: LiteDbMessageQueueTransportOptions

Namespace: DotNetWorkQueue.Transport.LiteDb.Basic

Time source

The LiteDb transport uses the local machine's clock for all time-dependent operations (delayed processing, expiration, heartbeat). If consumers run on multiple machines sharing the same database file, their clocks should be synchronized.

Connection string

LiteDb requires shared connections. The connection string format is:

Filename=path/to/queue.db;Connection=shared;
Configurable options

These options are set at queue creation time and cannot be changed after the queue exists.

Property Type Default Notes
EnableDelayedProcessing bool false Messages can be scheduled for future processing
EnableStatusTable bool false Separate table for queue status queries
EnableRoute bool false Tag messages with a route string
EnableMessageExpiration bool false Auto-remove unprocessed messages past expiry
EnableHistory bool false Message lifecycle tracking

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
Fixed options

The following are hardcoded in the LiteDb transport and cannot be changed:

Property Fixed value Notes
EnablePriority false Priority queuing is not supported
EnableStatus true Status tracking is always on
EnableHeartBeat true Crashed workers will have their messages recovered

LiteDb does not support EnableHoldTransactionUntilMessageCommitted, QueueType, AdditionalColumns, or AdditionalConstraints. These properties are not present on the LiteDb options class.

See MessageHistory for details on history tracking behavior.

Clone this wiki locally