Stratara.Abstractions
4.0.3
Prefix Reserved
dotnet add package Stratara.Abstractions --version 4.0.3
NuGet\Install-Package Stratara.Abstractions -Version 4.0.3
<PackageReference Include="Stratara.Abstractions" Version="4.0.3" />
<PackageVersion Include="Stratara.Abstractions" Version="4.0.3" />
<PackageReference Include="Stratara.Abstractions" />
paket add Stratara.Abstractions --version 4.0.3
#r "nuget: Stratara.Abstractions, 4.0.3"
#:package Stratara.Abstractions@4.0.3
#addin nuget:?package=Stratara.Abstractions&version=4.0.3
#tool nuget:?package=Stratara.Abstractions&version=4.0.3
Stratara.Abstractions
Derived. The behaviour described here is specified under
openspec/specs/. Those specifications are the source; this page explains and illustrates them.
License: MIT.
Contract interfaces and wire-level POCO records for the Stratara framework. Library-safe — depends only on Microsoft.Extensions.DependencyInjection.Abstractions, Microsoft.Extensions.Logging.Abstractions, and Stratara.Contracts. No EF Core or message-bus runtime.
Use this when you need to reference Stratara types without pulling in any concrete implementation (Mediator runtime, EF Core, RabbitMQ, etc.). Typical consumers: handler/projection libraries that ship without a host.
Contents
Stratara.Abstractions.Mediator—IMediator,IRequest,IRequest<T>,ICommand,ICommand<T>,IQuery<T>,ICommandHandler<T>,IQueryHandler<T,R>,IPipelineBehavior<T>,IPipelineBehavior<T,R>,IAggregateScopedCommand.Stratara.Abstractions.EventSourcing—IAggregationService,IEventSource,IEventStreamRepository,ISnapshotRepository,IEvent,IEvent<T>,IAggregateCreationEvent,IChangeSetHandler,EventChainAnchor,EventSubject,ConcurrencyException. Plus wire-types:EventStreamEntry,Snapshot.Stratara.Abstractions.Persistence—IUnitOfWork,IWriteUnitOfWork,IReadUnitOfWork,ITransaction,IDbResolver.Stratara.Abstractions.Outbox—ICommandOutboxDispatcher,IEventBundleOutboxDispatcher,IOutboxRepository. Plus wire-typeOutboxEntry.Stratara.Abstractions.Messaging—IMessageBus,IMessagingIdentifier,IEventBusConsumer,IEventBusPublisher.Stratara.Abstractions.Session—ISessionContextProvider.Stratara.Abstractions.Multitenancy—ITenantService,ICurrentUserService,ITenantScopedRequest,ICrossTenantAuthorizer,TenantAccessDeniedException,ITenantMembershipStore. Plus wire-types:TenantMembership,MembershipStatus.Stratara.Abstractions.Projections—IProjectionReplayState.Stratara.Abstractions.Security—IEncryptionFactory,IKeyStore,IMasterKeyProvider,ISecureBlobEncryptor,ISecureJsonSerializer. Plus wire-types:KeyScope,KeyMaterial,EncryptedData,DataSensitivityLevel,EncryptDataAttribute.Stratara.Abstractions.Validation—IValidator<T>,ValidationResult,ValidationFailure,ValidationSeverity,StrataraValidationException.Stratara.Abstractions.Entities—IEntity,IBucket,IHasRowVersion,IMultiTenant,ITenantEntity,IUserIdentity.Stratara.Abstractions.BackgroundTasks—IBackgroundTaskQueue. Plus wire-types:BackgroundTaskInfo,BackgroundTaskStatus.Stratara.Abstractions.Commands—IUpdateCommand.Stratara.Abstractions.Authorization—RequireRoleAttribute,RequirePermissionAttribute,IAuthorizationProvider,IPermissionResolver,PermissionCatalog,AuthorizationException,PermissionAuthorizationException.Stratara.Abstractions.Settings—ISettingProvider,ISettingStore,SettingCatalog. Plus wire-types:SettingDefinition,SettingScope.Stratara.Abstractions.ApiKeys—IApiKeyStore. Plus wire-types:ApiKeyDescriptor,ApiKeyIssueRequest,IssuedApiKey.
Why split
NuGet consumers without an event-sourcing host can adopt Stratara's CQRS contracts and authorization model without dragging in EF Core, RabbitMQ, or the WriteStore.
| 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
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- Stratara.Contracts (>= 4.0.3)
NuGet packages (13)
Showing the top 5 NuGet packages that depend on Stratara.Abstractions:
| Package | Downloads |
|---|---|
|
Stratara.Sessions
ASP.NET Core middleware and provider for Stratara's Actor/Subject session model. Reads tenant and user from JWT claims (or X-Tenant-Id / X-Client-Id headers) and populates the ambient ISessionContextProvider for every request. |
|
|
Stratara.Mediator
In-process mediator with DI-resolved handlers and pipeline behaviors for the Stratara framework. MediatR-style routing via typed wrapper cache, plus an authorizing decorator and a bucket-lock concurrency primitive. |
|
|
Stratara.Domain
Concrete domain types for the Stratara framework — the Tenant aggregate and its lifecycle events. Stratara's opinionated multitenancy model. |
|
|
Stratara.Resilience
Polly-based named resilience pipelines pre-wired for the Stratara framework's messaging and command/event dispatch paths. Four named pipelines registered via AddResiliencePipelines(). |
|
|
Stratara.Shared
Umbrella package for the Stratara framework — source-generated logger extensions for command flows, domain-event helpers, merge primitives, and the Tier-A/B abstractions surface re-exported as one transitive bundle. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.3 | 111 | 9/3/2026 |
| 4.0.2 | 259 | 9/3/2026 |
| 4.0.1 | 222 | 9/2/2026 |
| 4.0.0 | 465 | 8/31/2026 |
| 4.0.0-preview.1 | 136 | 8/31/2026 |
| 3.4.0 | 361 | 8/28/2026 |
| 3.3.0 | 525 | 8/25/2026 |
| 3.2.3 | 353 | 8/22/2026 |
| 3.2.2 | 918 | 8/14/2026 |
| 3.2.1 | 914 | 8/2/2026 |
| 3.2.0 | 341 | 7/18/2026 |
| 3.1.7 | 524 | 7/1/2026 |
| 3.1.6 | 746 | 6/22/2026 |
| 3.1.5 | 323 | 6/22/2026 |
| 3.1.4 | 2,185 | 6/15/2026 |
| 3.1.3 | 326 | 6/10/2026 |
| 3.1.2 | 327 | 6/5/2026 |
| 3.1.1 | 1,039 | 6/1/2026 |
| 3.1.0 | 302 | 5/30/2026 |
| 3.0.23 | 286 | 5/28/2026 |
Three fixes to the same complaint: a host composed exactly as the documentation describes did not
start. Each one was a registration the composites assumed somebody else had made — a tracer, a unit
of work, a Redis connection — and each is now made by the registration that needs it. Nothing that
already worked changes: every fix defers to a registration the host makes itself, in either order,
so the lines a working host added to get past these gaps can simply be deleted. Additive on every
published surface.
### Fixed
- **A host without Redis starts and dispatches.** Every composite that carries a dispatcher
registered the projection-replay state, and its only implementation took a Redis connection that
no composite registers, so a host composed as documented failed at its first dispatch unless it
also ran Redis and called `AddCaching()`. `AddProjectionReplayState()` now chooses at first
resolution: with a registered `IConnectionMultiplexer` the Redis-backed state as before, without
one an in-process state with the same lease semantics — and a warning, once at start-up
(`104_012`), that replay coordination is confined to that process, so a replay requested there
suppresses publication there only. A deployment whose replay must reach several hosts registers
the shared connection, in either order. Redis-backed hosts observe no change.
- **Registering a store context now registers its unit of work.**
`AddNpgsqlWriteDbContextFactory<T>()` registered the context factory, the context and the default
connection resolver but not the `IWriteUnitOfWork` that the event source, the outbox dispatcher and
the command worker take from the container — and nothing else in the published packages did, so a
host composed exactly as documented failed at its first command with a dependency-injection error.
The write registration now try-adds a scoped `IWriteUnitOfWork` over its context, and
`AddNpgsqlReadDbContextFactory<T>()` try-adds `IProjectionsUnitOfWork` and `IReadUnitOfWork`
likewise. A unit of work the host registers itself, before or after, is still the one used; a
hand-written registration can simply be deleted.
- **`AddMediator()` no longer requires the host to register an OpenTelemetry `Tracer`.** The
mediator traces every dispatch and obtained its tracer from the host, but nothing registered one,
so a host that called `AddMediator()` and nothing else failed at the first resolve of `IMediator`.
`AddMediator()` now registers a fallback that emits the dispatch spans from the framework's
`Stratara.Application` activity source — a host that subscribes to framework telemetry sees them,
a host that subscribes to nothing pays for nothing. A `Tracer` the host registers, before or after
`AddMediator()`, is still the one used, so no existing host changes behaviour; the registration
line can simply be deleted. The samples, the README and the package README no longer carry it.