OpenSleigh.InMemory 3.0.4.2
OpenSleigh.InMemory
Description
In-memory Persistence and Transport library for OpenSleigh
Installation
This library can be installed from Nuget: https://www.nuget.org/packages/OpenSleigh.InMemory/
How-to
We can use this library for both Persistence and Transport:
Host.CreateDefaultBuilder(args)
.ConfigureServices((hostContext, services) => {
services.AddOpenSleigh(cfg =>{
cfg.UseInMemoryTransport()
.UseInMemoryPersistence();
// register the Sagas here
});
});
Of course it can be used in conjunction with any other library as well (eg. InMemory Transport + MongoDb Persistence).
If you decide to use the InMemory Transport, you also have to configure each Saga :
Host.CreateDefaultBuilder(args)
.ConfigureServices((hostContext, services) => {
// code omitted //
cfg.AddSaga<MySaga, MySagaState>()
.UseStateFactory<StartSaga>(msg => new MySagaState(msg.CorrelationId))
.UseInMemoryTransport();
});
});
Showing the top 20 packages that depend on OpenSleigh.InMemory.
| Packages | Downloads |
|---|---|
|
OpenSleigh.Samples.Sample1
Package Description
|
0 |
.NET 8.0
- OpenSleigh (>= 3.0.4.2)
- System.Threading.Channels (>= 9.0.4)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.5)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.5)