Franz.Common.AzureCosmosDB
2.2.16
dotnet add package Franz.Common.AzureCosmosDB --version 2.2.16
NuGet\Install-Package Franz.Common.AzureCosmosDB -Version 2.2.16
<PackageReference Include="Franz.Common.AzureCosmosDB" Version="2.2.16" />
<PackageVersion Include="Franz.Common.AzureCosmosDB" Version="2.2.16" />
<PackageReference Include="Franz.Common.AzureCosmosDB" />
paket add Franz.Common.AzureCosmosDB --version 2.2.16
#r "nuget: Franz.Common.AzureCosmosDB, 2.2.16"
#:package Franz.Common.AzureCosmosDB@2.2.16
#addin nuget:?package=Franz.Common.AzureCosmosDB&version=2.2.16
#tool nuget:?package=Franz.Common.AzureCosmosDB&version=2.2.16
Franz.Common.AzureCosmosDB (v1.7.7)
A specialized persistence library within the Franz Framework, providing seamless integration with Azure Cosmos DB.
This package extends the framework’s polyglot persistence capabilities by enabling:
- NoSQL document storage
- Outbox pattern messaging
- Dead-letter storage
- Cosmos-backed distributed transaction patterns
- EF Core Cosmos provider alignment
All designed following Franz’s deterministic, message-driven architecture.
Features
🚀 Cosmos DB Bootstrapping
High-level
ServiceCollectionExtensionsfor Cosmos initialization.Automatic provisioning of:
CosmosClientDatabase- Containers with partitioning
Supports typed container resolution through configuration patterns.
📬 Outbox & Dead-Letter Messaging
CosmosDBMessageStoreimplementsIMessageStorefrom Franz.Common.Messaging.Storage.Guarantees:
- Async-safe writes
- Deterministic message IDs
- Automatic dead-lettering
- Resilient retry-based delivery
Now supports Batch Writes introduced in 1.7.5 for improved performance.
📦 Repository Support
A generic Cosmos repository abstraction:
ICosmosRepository<T>
providing:
- CRUD operations
- Partition key awareness
- Automatic model-to-container mapping
- Optional optimistic concurrency
Now aligned with the Cosmos EF Provider conventions for maximum portability across SQL, Mongo, and Cosmos stores.
🔧 EF Core Cosmos Provider (1.7.x Integration)
Franz 1.7.x unifies Cosmos EF Core support:
- New
CosmosDbContextBase - Conventions via
ApplyCosmosConventions() - Default container fallback for multi-container apps
- Deterministic outbox dispatch integration using
IDispatcher
This makes CosmosDB a first-class citizen in the event-sourced pipeline.
⚡ Version 1.7.5 Additions
Major Additions
- Full alignment with
.NET 10.0SDK. - Cosmos EF provider stabilization & conventions.
- Unified Cosmos document serializer aligned with Franz’s null-safety rules.
- Deterministic container creation logic (optional auto-provisioning).
- Batch persistence for message-based storage.
Fixes & Improvements
- Hardened message serialization for CosmosDB.
- Fixed dead-letter partition routing.
- Improved DI boot ordering for Cosmos-backed message stores.
- Refactored container naming strategy for multi-tenant scenarios.
- Ensured async safety across the entire Cosmos subsystem.
Installation
From Private Azure Feed
dotnet nuget add source "https://your-private-feed-url" \
--name "AzurePrivateFeed" \
--username "YourAzureUsername" \
--password "YourAzurePassword" \
--store-password-in-clear-text
Install:
dotnet add package Franz.Common.AzureCosmosDB
Usage
1️⃣ Configure Cosmos DB
{
"CosmosDb": {
"ConnectionString": "...",
"DatabaseName": "FranzAppDb",
"Containers": {
"Messages": "outbox",
"DeadLetters": "failed"
}
}
}
2️⃣ Register Cosmos in DI
services.AddCosmosDatabase(Configuration);
services.AddCosmosMessageStore(
Configuration["CosmosDb:ConnectionString"],
Configuration["CosmosDb:DatabaseName"]);
3️⃣ Using the Message Store
var msg = new Message("hello");
await messageStore.SaveAsync(msg);
Dependencies
- Franz.Common.Messaging
- Franz.Common.Messaging.Storage
- Microsoft.Azure.Cosmos
- Franz.Common.EntityFramework (optional for EF provider)
Current Version: v2.2.16
Changelog
v2.0.1 – Internal Modernization
- Messaging and infrastructure refactored for async, thread-safety, and modern .NET 10 patterns.
- All APIs remain fully backward compatible.
- Tests, listeners, and pipeline components modernized.
Version 1.7.8
🔹 Updated to .NET 10.0.3 SDK.
Version 1.7.5
🔹 CosmosDB EF provider fully integrated 🔹 Unified Cosmos conventions for container naming & partitioning 🔹 Batch write support for outbox 🔹 Deterministic message serialization & schema validation 🔹 Improved DI bootstrapping order 🔹 Full .NET 10 alignment
Version 1.6.2
- Introduced Cosmos DB integration.
- Added
CosmosDBMessageStore. - Added generic repository pattern.
- Added outbox/dead-letter support.
Version 1.6.20
- Updated to .NET 10 SDK.
Contributing
Internal to Franz Framework development team.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Franz.Common.EntityFramework (>= 2.2.16)
- Franz.Common.Messaging (>= 2.2.16)
- Microsoft.Azure.Cosmos (>= 3.61.0)
- Microsoft.EntityFrameworkCore.Cosmos (>= 10.0.9)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.9)
- Newtonsoft.Json (>= 13.0.4)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Franz.Common.AzureCosmosDB:
| Package | Downloads |
|---|---|
|
Franz.Common.Http.EntityFramework
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Messaging.EntityFramework
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Messaging.Sagas
Shared utility library for the Franz Framework. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.2.16 | 0 | 7/2/2026 |
| 2.2.15 | 91 | 6/29/2026 |
| 2.2.14 | 92 | 6/29/2026 |
| 2.2.13 | 94 | 6/29/2026 |
| 2.2.12 | 89 | 6/28/2026 |
| 2.2.11 | 89 | 6/28/2026 |
| 2.2.10 | 98 | 6/28/2026 |
| 2.2.9 | 93 | 6/28/2026 |
| 2.2.8 | 89 | 6/28/2026 |
| 2.2.7 | 129 | 6/7/2026 |
| 2.2.6 | 129 | 6/6/2026 |
| 2.2.5 | 144 | 6/4/2026 |
| 2.2.4 | 134 | 6/3/2026 |
| 2.2.3 | 127 | 6/2/2026 |
| 2.2.2 | 130 | 6/2/2026 |
| 2.2.1 | 130 | 5/24/2026 |
| 2.1.4 | 128 | 4/27/2026 |
| 2.1.3 | 123 | 4/26/2026 |
| 2.1.2 | 119 | 4/26/2026 |
| 2.1.1 | 132 | 4/22/2026 |