In Memory Persistence

Component: NServiceBus | Nuget: NServiceBus (Version: 6.x)

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

endpointConfiguration.UsePersistence<InMemoryPersistence, StorageType.Sagas>();
endpointConfiguration.UsePersistence<InMemoryPersistence, StorageType.Subscriptions>();
endpointConfiguration.UsePersistence<InMemoryPersistence, StorageType.Timeouts>();
endpointConfiguration.UsePersistence<InMemoryPersistence, StorageType.Outbox>();
endpointConfiguration.UsePersistence<InMemoryPersistence, StorageType.GatewayDeduplication>();
Because there is no clustering / replication happening between NServiceBus instances, when a process is down, all the information stored in the InMemory persistence of that process is lost.
The Delayed Retries mechanism uses the deferred delivery (also known as timeouts) feature internally. As Delayed Retries is enabled by default, using InMemory persistence means the risk of losing messages that have failed processing and are waiting for another retry attempt. Use InMemory persistence only is scenarios where it is OK to lose messages.

Last modified