Skip to content

LiteDbQueueCreationOptions

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

LiteDb Queue Creation Options

When creating a new LiteDb queue, there are various features that you can enable and disable. Most of these options will change the schema of the queue. All of these options must be set before creating the queue. The database file can either already exist, or the queue creator will create it at the location specified by the connection string for you.

  • EnableDelayedProcessing

The queue supports delayed processing.

  • Heartbeat

Heartbeat is always enabled for the LiteDb transport. If a worker dies, other workers will be able to dequeue the message. This cannot be disabled.

  • Message Expiration

The queue supports expiration of messages.

  • Status

Status tracking is always enabled for the LiteDb transport. This allows the queue to rollback messages and recover from crashed workers. This cannot be disabled.

  • Enable Status Table

The queue can create and update a separate table that you can query to see the status of the queue. This is safer than querying the queue itself, as you may block operations and cause deadlocks.

Defaults to false. Unlike relational transports, LiteDb does not auto-enable this when adding custom columns (LiteDb does not support additional columns).

createQueue.Options.EnableStatusTable = true;
  • Enable Message Expiration

The queue supports expiration of messages. Messages that sit unprocessed past a configured time span get removed automatically.

createQueue.Options.EnableMessageExpiration = true;
  • Enable Route

Tag messages with a route string. Consumers can filter to process only messages with a specific route.

createQueue.Options.EnableRoute = true;
  • Enable History

The queue can retain processed messages in a history table for auditing purposes. Defaults to false.

createQueue.Options.EnableHistory = true;

See LiteDbOptions for the complete property reference.

See MessageHistory for history retention configuration.

Clone this wiki locally