AI agents: use the documentation index at llms.txt to locate machine-readable pages. This section is indexed by https://docs.particular.net/persistence/llms.txt. The markdown version of this page is served as plain text. An MCP server at /mcp serves the same content via the search_docs and read_doc tools; it is read-only and needs no credentials. Markdown versions of documentation pages are available by appending .md to the page URL. Directory URLs use index.md. They are served as text/plain because some retrieval backends reject text/markdown.

Service Fabric Persistence

NuGet Package:
NServiceBus.Persistence.ServiceFabric 3.x
Target Version:
NServiceBus 8.x
Standard support for version 8.x of NServiceBus has expired. For more information see our Support Policy.

A persister built on top of Service Fabric Reliable Collections.

Persistence at a glance

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

Feature
Supported storage typesSagas, Outbox
TransactionsYes
Concurrency controlPessimistic concurrency via exclusive locks
Scripted deploymentNot supported
InstallersNone

Usage

Add a NuGet package reference to NServiceBus.Persistence.ServiceFabric. Configure the persistence technology using the following configuration API.

var persistence = endpointConfiguration.UsePersistence<ServiceFabricPersistence>();
persistence.StateManager(reliableStateManager);

Transaction timeout

The transaction timeout is a setting that controls the timeout for saga and outbox operations executed by the persistence.

The default transaction timeout is set to four seconds.

var persistence = endpointConfiguration.UsePersistence<ServiceFabricPersistence>();
persistence.StateManager(reliableStateManager, transactionTimeout: TimeSpan.FromSeconds(10));

Limitations

Storage types

Currently saga and outbox storage types are supported. For timeouts, subscriptions or gateway deduplication use either the native capability of the transport of choice or another persistence such as Azure Table Persistence or non-durable persistence.

Viewing the data

Currently, Service Fabric does not provide capabilities to view the data that is stored inside reliable collections. The data has to be programmatically accessed and exposed over customized infrastructure.

Data should be backed up and restored to avoid data loss. See Service Fabric backup and restore APIs for additional information.

Related Articles