Skip to content

LiteDbQueueCreationOptions

blehnen edited this page Nov 10, 2026 · 4 revisions

LiteDb Queue Creation Options

When you create a new LiteDb queue, you can enable and disable various features. Most of these options change the schema of the queue. You must set all of these options before you create the queue. The database file can already exist. If it does not, the queue creator will create it at the location that the connection string specifies.

  • EnableDelayedProcessing

The queue supports delayed processing.

  • Heartbeat

Heartbeat is always enabled for the LiteDb transport, and you cannot disable it. If a worker dies, other workers can dequeue the message.

  • Message Expiration

The queue supports expiration of messages.

  • Status

Status tracking is always enabled for the LiteDb transport, and you cannot disable it. Status tracking lets the queue roll back messages and recover from crashed workers.

  • 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, because a direct query can block operations and cause deadlocks.

The default is false. The relational transports enable this table automatically when you add custom columns. LiteDb does not, because it does not support additional columns.

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

The queue supports expiration of messages. The queue automatically removes messages that stay unprocessed longer than a configured time span.

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 keep processed messages in a history table for auditing. The default is false.

createQueue.Options.EnableHistory = true;

See LiteDbOptions for the complete property reference.

See MessageHistory for history retention configuration.

Clone this wiki locally