Getting Started
Architecture
NServiceBus
Transports
Persistence
ServiceInsight
ServicePulse
ServiceControl
Monitoring
Samples

Non-durable persistence

NuGet Package: NServiceBus.Persistence.NonDurable (2.x)
Target Version: NServiceBus 9.x

Some scenarios require a non-durable persistence such as the development environment or a lightweight client not interested in durability across restarts:

Persistence at a glance

For a description of each feature, see the persistence at a glance legend.

Feature
Storage TypesSagas, Outbox, Subscriptions
TransactionsNone
Concurrency controlOptimistic concurrency
Scripted deploymentDoes not apply
InstallersDoes not apply

Configuration

endpointConfiguration.UsePersistence<NonDurablePersistence, StorageType.Sagas>();
endpointConfiguration.UsePersistence<NonDurablePersistence, StorageType.Subscriptions>();
endpointConfiguration.UsePersistence<NonDurablePersistence, StorageType.Outbox>();

Saga concurrency

When simultaneously handling messages, conflicts may occur. See below for examples of the exceptions which are thrown. Saga concurrency explains how these conflicts are handled, and contains guidance for high-load scenarios.

Starting a saga

Example exception:

System.InvalidOperationException: The saga with the correlation id 'Name: OrderId Value: f05c6e0c-aea6-48d6-846c-d1663998ebf2' already exists

Updating or deleting saga data

Non-durable persistence uses optimistic concurrency control when updating or deleting saga data.

Example exception:

Related Articles