Papst.EventStore.AzureCosmos
5.2.7
See the version list below for details.
dotnet add package Papst.EventStore.AzureCosmos --version 5.2.7
NuGet\Install-Package Papst.EventStore.AzureCosmos -Version 5.2.7
<PackageReference Include="Papst.EventStore.AzureCosmos" Version="5.2.7" />
<PackageVersion Include="Papst.EventStore.AzureCosmos" Version="5.2.7" />
<PackageReference Include="Papst.EventStore.AzureCosmos" />
paket add Papst.EventStore.AzureCosmos --version 5.2.7
#r "nuget: Papst.EventStore.AzureCosmos, 5.2.7"
#:package Papst.EventStore.AzureCosmos@5.2.7
#addin nuget:?package=Papst.EventStore.AzureCosmos&version=5.2.7
#tool nuget:?package=Papst.EventStore.AzureCosmos&version=5.2.7
Azure Cosmos Implementation of Event Stream
The Azure Cosmos Implementation needs to be added to the dependency injection container.
To achieve this, there are two extension methods available, one using a client factory function and one a direct CosmosClient
parameter:
IServiceCollection services;
// direct CosmosClient parameter
services.AddCosmosEventStore(
new CosmosClient(...),
"database",
"container");
// CosmosClient Factory, that has a IServiceProvider as parameter
services.AddCosmosEventStore(
sp => sp.GetRequiredService<CosmosClient>(),
"database",
"container");
In addition it is necessary to Configure the class CosmosEventStoreOptions
with the options below.
Configuration
The CosmosEventStore class uses the Options pattern to retrieve its configuration.
Therefore a ConfigurationSection can be added to the AddCosmosEventStore
extension method for the IServiceCollection.
The C# representation of the Configuration Sections looks like this:
public class CosmosEventStoreOptions
{
/// <summary>
/// Count of retries when two parties are updating the same stream to avoid concurrency issues
/// </summary>
public int ConcurrencyRetryCount { get; set; } = 3;
/// <summary>
/// Whether to try to build the index for an existing stream, when no index is found
/// or to return a <see cref="Papst.EventStore.Exceptions.EventStreamNotFoundException"/>
/// </summary>
public bool BuildIndexOnNotFound { get; set; }
/// <summary>
/// Flag if the Tenant Id of the Stream Meta Data should be updated when appending a new event
/// </summary>
public bool UpdateTenantIdOnAppend { get; set; } = true;
}
Migration
With the new V5 based implementation, there is need for an index document in the cosmos database for each stream.
For a convenient upgrade, there has been an option to the configuration added, that builds an index, when a stream is requested using GetAsync
method in IEventStore
and the stream is not found.
A manual upgrade is not yet supported.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- Azure.Core (>= 1.43.0)
- Microsoft.Azure.Cosmos (>= 3.43.1)
- Microsoft.Extensions.Options (>= 8.0.2)
- Nerdbank.GitVersioning (>= 3.6.143)
- Newtonsoft.Json (>= 13.0.3)
- Papst.EventStore (>= 5.2.7)
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 |
---|---|---|
5.2.32 | 149 | 6/3/2025 |
5.2.30 | 204 | 2/12/2025 |
5.2.28 | 129 | 2/9/2025 |
5.2.25 | 113 | 2/9/2025 |
5.2.23 | 119 | 2/9/2025 |
5.2.21 | 126 | 12/7/2024 |
5.2.18 | 757 | 11/12/2024 |
5.2.14 | 145 | 11/10/2024 |
5.2.12 | 119 | 11/10/2024 |
5.2.10 | 117 | 11/10/2024 |
5.2.7 | 291 | 9/28/2024 |
5.1.4 | 217 | 8/26/2024 |
5.1.2 | 139 | 8/22/2024 |
5.0.12 | 137 | 8/15/2024 |
5.0.10 | 115 | 8/7/2024 |
5.0.9 | 109 | 8/7/2024 |
5.0.8 | 118 | 8/7/2024 |
5.0.6 | 114 | 8/6/2024 |
5.0.4 | 101 | 8/6/2024 |
5.0.2 | 105 | 8/4/2024 |