Skip to content

LiteDbOptions

blehnen edited this page Nov 10, 2026 · 5 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 that share the same database file, you should synchronize their clocks.

Connection string

LiteDb requires shared connections. The connection string format is:

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

You set these options when you create the queue. You cannot change them 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

These options are hardcoded in the LiteDb transport, and you cannot change them:

Property Fixed value Notes
EnablePriority false Priority queuing is not supported
EnableStatus true Status tracking is always on
EnableHeartBeat true The queue recovers messages from crashed workers

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