StreamStore.Storage.EventFlow
0.1.0
dotnet add package StreamStore.Storage.EventFlow --version 0.1.0
NuGet\Install-Package StreamStore.Storage.EventFlow -Version 0.1.0
<PackageReference Include="StreamStore.Storage.EventFlow" Version="0.1.0" />
<PackageVersion Include="StreamStore.Storage.EventFlow" Version="0.1.0" />
<PackageReference Include="StreamStore.Storage.EventFlow" />
paket add StreamStore.Storage.EventFlow --version 0.1.0
#r "nuget: StreamStore.Storage.EventFlow, 0.1.0"
#:package StreamStore.Storage.EventFlow@0.1.0
#addin nuget:?package=StreamStore.Storage.EventFlow&version=0.1.0
#tool nuget:?package=StreamStore.Storage.EventFlow&version=0.1.0
StreamStorage for EventFlow
Adapter of StreamStore
's storage backends to use as EventFlow
's event store.
What
Implements IEventPersistence interface uses IStreamStorage interface implementation of any StreamStore
's storage backends.
Why
Why would you need this?
Despite the fact that EventFlow
solution already contains many implementations of persistence, such as SQL, EventStore, ElasticSearch etc., there is not so many NoSQL backends provided.
So, if you are using or decided to use EventFlow
want to high available distributed storage, such as Cassandra
, you should consider to use this component.
Since StreamStore
does not support global positioning, methods using global positioning are not implemented.
Component does not implement adapter of StreamStore
solution, only the storage backend part, so functionality like automatic schema provisioning, earlier detection of event duplication etc. is not available.
How
How to use it? It is pretty easy.
First, if you just decided to use EventFlow
, you must install EventFlow package:
dotnet add package EventFlow
Then install adapter:
dotnet add package StreamStore.Storage.EventFlow
After that install particular StreamStore
storage backend, for instance Cassandra:
dotnet add package StreamStore.NoSql.Cassandra
Finally, register and configure EventFlow
in DI container:
using var serviceCollection = new ServiceCollection()
// ...
.AddEventFlow(e =>
// ...
// Register adapter
e => e.UseStreamStorageEventStore(services =>
// Register and configure particular storage backend, for instance Cassandra
// How to configure storage backend, you can find in documentation of particular one.
// For instance here:
// https://github.com/kostiantyn-matsebora/streamstore/tree/master/src/StreamStore.NoSql.Cassandra#configuration-options
services.UseCassandra(...);
)
)
// ...
.BuildServiceProvider();
More information about EventFlow
configuration you can find in official documentation.
Multitenancy
Despite the fact, that EventFlow
itself does not have explicit support of multitenancy, this component provides such ability in a tricky way.
To be able to use adapter in multitenant mode, you must create and register implementation if ITenantIdResolver interface, responsible for resolution of tenant identifier based on current context, for example HtttpContextTenantIdResolver
resolves tenant identifier based on HTTP request:
using var serviceCollection = new ServiceCollection()
// ...
.AddEventFlow(e =>
// ...
// Register adapter
e => e.UseStreamStorageEventStore<HtttpContextTenantIdResolver>(services =>
// Register and configure particular storage backend, for instance Cassandra
// How to configure storage backend, you can find in documentation of particular one.
// For instance here:
// https://github.com/kostiantyn-matsebora/streamstore/tree/master/src/StreamStore.NoSql.Cassandra#configuration-options
services.UseCassandraWithMultitenancy(...);
)
)
// ...
.BuildServiceProvider();
Schema Provisioning
Automatic schema provisioning is a part of StreamStore
solution implemented as background service and not available as part of component.
However, you can still use schema provisioning implementation of particular storage.
For single tenant mode:
var serviceProvider = serviceCollection.BuildServiceProvider();
// Get provisioner from DI container
var provisioner = serviceProvider.GetRequiredService<ISchemaProvisioner>();
// Run schema provisioning
await provisioner.ProvisionSchemaAsync(token);
For multitenancy:
var serviceProvider = serviceCollection.BuildServiceProvider();
// Get provisioner factory from DI container
var provisionerFactory = serviceProvider.GetRequiredService<ITenantSchemaProvisionerFactory>();
// Iterate tenants
foreach (var tenantId in tenants) {
// Get provisioner for particular tenant
var provisioner = provisionerFactory.Create(tenantId);
// Run schema provisioning for tenant
await provisioner.ProvisionSchemaAsync(token);
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- EventFlow (>= 1.2.1)
- StreamStore.Storage.Contracts (>= 0.10.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.1.0 | 228 | 6/13/2025 |