The Learning Persistence simulates saga persistence infrastructure by storing data in the local file system. All files and directories are relative to the current project directory.
Added in NServiceBus 6.3.
Some recommended use cases are:
- Learning/Experimenting with NServiceBus features.
- Building a spike or demo.
- Reproducing a bug that is not related to a production transport, for example when raising a support case.
By default all data is stored in a
. directory that exists at AppDomain.CurrentDomain.BaseDirectory.
To configure the storage location:
var persistence = endpointConfiguration.UsePersistence<LearningPersistence>(); persistence.SagaStorageDirectory("PathToStoreSagas");
Each saga will be stored a sub-directory matching the saga type name with the saga data being serialized into a
. file named based on the saga Id.