Sora.Data.Cqrs.Outbox.Mongo 0.2.20

dotnet add package Sora.Data.Cqrs.Outbox.Mongo --version 0.2.20
                    
NuGet\Install-Package Sora.Data.Cqrs.Outbox.Mongo -Version 0.2.20
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sora.Data.Cqrs.Outbox.Mongo" Version="0.2.20" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sora.Data.Cqrs.Outbox.Mongo" Version="0.2.20" />
                    
Directory.Packages.props
<PackageReference Include="Sora.Data.Cqrs.Outbox.Mongo" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Sora.Data.Cqrs.Outbox.Mongo --version 0.2.20
                    
#r "nuget: Sora.Data.Cqrs.Outbox.Mongo, 0.2.20"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Sora.Data.Cqrs.Outbox.Mongo@0.2.20
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Sora.Data.Cqrs.Outbox.Mongo&version=0.2.20
                    
Install as a Cake Addin
#tool nuget:?package=Sora.Data.Cqrs.Outbox.Mongo&version=0.2.20
                    
Install as a Cake Tool

Sora.Data.Cqrs.Outbox.Mongo

MongoDB-backed IOutboxStore for Sora's implicit CQRS pipeline.

  • Durable outbox storage using MongoDB
  • Leased dequeuing to avoid concurrent delivery
  • Unique index on DedupKey (if provided in the future)

Quick start

  • Just reference this package and the provider will be discovered automatically. The outbox selector picks the highest ProviderPriority and prefers Mongo over the in-memory default.
  • Optionally, call services.AddMongoOutbox() to register explicitly or to override options in code.

Install and enable

  1. Configure from appsettings (bound from Sora:Cqrs:Outbox:Mongo). Connection will resolve in this order:
  • options.ConnectionString (explicit)
  • Sora:Data:Sources:{name}:mongo:ConnectionString (named source; {name} = ConnectionStringName, default "mongo")
  • ConnectionStrings:{name}

Example appsettings.json (named connection via ConnectionStrings)

{
  "Sora": {
    "Cqrs": {
      "Outbox": {
        "Mongo": {
          // ConnectionStringName defaults to "mongo"; set explicitly if you like
          "ConnectionStringName": "mongo",
          "Database": "sora",
          "Collection": "Outbox",
          "LeaseSeconds": 30,
          "MaxAttempts": 10
        }
      }
    }
  },
  "ConnectionStrings": {
    "mongo": "mongodb://localhost:27017"
  }
}

Alternative (inline connection string under Sora:Cqrs:Outbox:Mongo)

{
  "Sora": {
    "Cqrs": {
      "Outbox": {
        "Mongo": {
          "ConnectionString": "mongodb://localhost:27017",
          "Database": "sora",
          "Collection": "Outbox"
        }
      }
    }
  }
}
  1. Register the store in your service setup:

services.AddMongoOutbox(); // binds from Sora:Cqrs:Outbox:Mongo and defaults name to "mongo"

Or override via options:

services.AddMongoOutbox(o ⇒ { o.ConnectionStringName = "custom-mongo"; // or set o.ConnectionString directly o.Database = "sora"; o.Collection = "Outbox"; o.LeaseSeconds = 30; o.MaxAttempts = 10; });

Notes:

  • Cqrs initializer registers a default in-memory outbox. Adding Mongo will override it (highest ProviderPriority wins; explicit registration also works).
  • The outbox processor (in Sora.Data.Cqrs) will pick up this store automatically.

Schema and indexes

The store creates indexes on:

  • Status + VisibleAt (for efficient pending scans)
  • LeaseUntil (to reclaim expired leases)
  • DedupKey (unique, sparse)
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.2.20 35 8/22/2025
0.2.18 113 8/20/2025
0.2.17 113 8/19/2025
0.2.16 113 8/18/2025