osstotalsoft/nbb
44.9
Weak · 8 November 2026
16.4k
lines of production code
C#
with F#
7
measurements over time
What this system is
Features
Add ASP.NET Core multi-tenancy middleware
Introduces the NBB.MultiTenancy.AspNet package, which provides a middleware component to identify tenants from incoming requests, load tenant information, and build the current tenancy context. Users can register this middleware in their application startup using the \UseTenantMiddleware\ extension method, which handles both mono-tenant and multi-tenant scenarios by setting the tenant context and configuring logging scopes.
src/MultiTenancy/NBB.MultiTenancy.AspNet · high confidence
Add Aspire-enabled Payments Migrations service
The NBB.Payments.Migrations sample now includes a dedicated migration service that runs database and EventStore migrations on startup. It uses Entity Framework Core to apply SQL Server migrations for the PaymentsDbContext and creates EventStore objects via AdoNetEventStoreDatabaseMigrator, with support for cancellation tokens and structured logging. The service is configured via appsettings.json (connection strings) and registered in a .NET Generic Host, and can be containerized using the provided Dockerfile based on the ASP.NET Core 2.0 image.
samples/MicroServices/NBB.Payments/NBB.Payments.Migrations · high confidence
Add DotEnv configuration provider and identity-aware connection string resolution
The NBB.Core.Configuration package now supports loading settings from .env-style files via the new AddDotEnvFile extension, allowing hierarchical configuration using double-underscore separators. Additionally, a new ResolveConnectionString extension method enables building connection strings from segmented configuration data (Server, Database, UserName, Password, etc.) rather than a single string value. This method specifically supports passwordless authentication modes (ActiveDirectoryWorkloadIdentity, ActiveDirectoryManagedIdentity, ActiveDirectoryMSI, and ActiveDirectoryDefault) by using an IdentityClientId instead of a password, throwing a ConnectionStringConfigurationException if mandatory segments are missing.
src/Core/NBB.Core.Configuration · high confidence
Add F\# Invoices Worker sample
A new F\# sample worker for the Invoices microservice has been added to the samples directory. This worker subscribes to the same published language commands as the existing C\# Invoices worker, utilizing the NBB messaging infrastructure with JetStream transport, correlation middleware, and default resiliency settings.
samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Worker · high confidence
Add HTTP GET effect support via NBB.Http.Effects
The src/Http area now includes the NBB.Http.Effects package, introducing a new way to perform HTTP GET requests using the framework's effect system. Users can register the necessary services by calling AddHttpEffects on the service collection, which configures the HttpClient and registers the HttpGet handler. The Http static class provides a Get method that returns an Effect\<HttpResponseMessage\>, allowing HTTP GET operations to be composed within the effect system alongside other side effects.
src/Http · high confidence
Add NATS Streaming transport implementation
Users can now use NATS Streaming (STAN) as a messaging transport by registering the new \AddNatsTransport\ extension method. This adds configuration support via \NatsOptions\ (including cluster, client ID, durable names, and acknowledgment settings) and registers the \StanMessagingTransport\ to handle publishing and subscribing with support for durable subscriptions, queue groups, and manual acknowledgments.
src/Messaging/NBB.Messaging.Nats · high confidence
Add Orchestration Sample with Process Manager and Mediator Integration
This change introduces a new sample application demonstrating how to orchestrate microservices using a process manager pattern. The sample includes an \InvoicingProcessManager\ that defines a state machine for handling invoice lifecycles (from contract validation to payment completion) and reacts to events like \ContractValidated\, \InvoiceCreated\, and \PayableExpired\. It integrates with the NBB framework by registering a scoped Mediator, configuring a JetStream message bus transport, and setting up an EventStore with AdoNet persistence. The sample also demonstrates how to wire up process manager handlers and apply middleware pipelines for correlation, exception handling, and resiliency.
samples/MicroServices/NBB.MicroServicesOrchestration · high confidence
Add ProcessManager sample application
Introduces a new sample application in samples/Orchestration/ProcessManagerSample that demonstrates the NBB ProcessManager capabilities. The sample includes an OrderProcessManager and a PollingLoopPM to illustrate stateful workflow orchestration, event correlation, and effect-based actions (such as publishing commands and scheduling timers). It also provides the necessary infrastructure wiring, including MediatR integration for queries and commands, an in-memory event store, and a messaging host with subscriber logging middleware.
samples/Orchestration · high confidence
Add Serilog SQL Server sink with correlation ID support
The NBB.Correlation.Serilog.SqlServer package now provides extension methods to write log events to a SQL Server table while automatically including a dedicated column for the correlation ID. Users can configure this via the new MsSqlServerWithCorrelation or MsSqlServerWithAdditionalColumns methods, which handle the column setup within the Serilog MSSqlServer sink configuration.
src/Correlation/NBB.Correlation.Serilog.SqlServer · high confidence
Add default messaging tenant identification service
Users can now register the default multi-tenancy identification strategy for messaging by calling the new AddDefaultMessagingTenantIdentification extension method. This single registration configures the tenant identification service to use IdTenantIdentifier and resolves tenant tokens from the standard MessagingHeaders.TenantId header, simplifying the setup required for multi-tenant message processing.
src/MultiTenancy/NBB.MultiTenancy.Identification.Messaging/Extensions · high confidence
Add messaging-based tenant identification via header resolver
The NBB.MultiTenancy.Identification.Messaging package now enables identifying tenants from messaging envelopes. It introduces TenantIdHeaderMessagingTokenResolver, which extracts a tenant token from a specified message header, and provides AddDefaultMessagingTenantIdentification() to register a default strategy that looks for the tenant ID in the "nbb-tenantID" header.
src/MultiTenancy/NBB.MultiTenancy.Identification.Messaging · high confidence
Add multi-tenancy configuration and service registration
The multi-tenancy subsystem now provides a dedicated hosting layer that allows applications to configure and register core multi-tenancy services. Users can enable multi-tenancy by calling the new \AddMultitenancy\ extension method, which reads the \MultiTenancy\ configuration section to determine the operating mode (MultiTenant or MonoTenant) via \TenancyHostingOptions\. This registration also binds the configuration and adds the \ITenantContextAccessor\ as a singleton, making tenant context available throughout the application's service lifecycle.
src/MultiTenancy/NBB.MultiTenancy.Abstractions/Hosting · high confidence
Added F\# invoice domain aggregate and repository for the MicroServices sample
The MicroServices sample now includes a new F\# implementation for the invoice domain, featuring an Invoice aggregate that supports creation and payment marking via events, along with a corresponding repository interface for retrieving and saving invoice state.
NBB.Invoices.FSharp · high confidence
Added F\# monadic effect wrappers for Reader, State, and ReaderState computations
New F\# source files have been added to the \NBB.Core.Effects.FSharp.Data\ namespace, introducing \ReaderEffect\, \StateEffect\, and \ReaderStateEffect\ modules. These provide monadic wrappers over the existing \Effect\ type, enabling functional composition of read-only contexts, mutable state management, and combined reader-state scenarios. The additions include standard monadic operations (map, bind, apply), computation expression builders, and utility functions for traversing lists and results within these effect contexts.
src/Core/NBB.Core.Effects.FSharp/Data · high confidence
Added NATS Streaming connection manager with automatic recovery
The NATS messaging component now includes a new internal StanConnectionProvider that manages connections to NATS Streaming. This provider handles connection establishment, monitors for lost connections, and automatically resets the connection state when an unrecoverable error occurs, ensuring the worker remains livable even when the NATS server is down.
src/Messaging/NBB.Messaging.Nats/Internal · high confidence
Added No-op messaging transport for development and testing
A new no-op messaging transport implementation has been added to the NBB.Messaging.Noop package, providing a lightweight alternative for scenarios where actual message transport is not required. This includes a NoopMessagingTransport that silently accepts publishes and returns disposable subscriptions, a NoopTransportMonitor that implements the transport monitoring interface with empty event handlers, and a NoopDisposable helper class. The transport is registered via the new AddNoopTransport extension method, which binds the no-op implementations to the IMessagingTransport and ITransportMonitor abstractions in the dependency injection container.
src/Messaging/NBB.Messaging.Noop · high confidence
Added Payables API controller
Introduced the PayablesController in the NBB.Payments.Api service, exposing endpoints to retrieve payables by ID or list all, and to trigger payment processing via a POST to the /payables/{id}/pay route. The controller integrates with the message bus to publish payment commands and queries the domain model for read operations.
samples/MicroServices/NBB.Payments/NBB.Payments.Api/Controllers · high confidence
Added command handlers for creating and paying payables
The application layer now includes handlers for the CreatePayable and PayPayable commands. These handlers process incoming requests to create new payable records and to mark existing payables as paid, respectively, by interacting with the CRUD repository to persist changes.
samples/MicroServices/NBB.Payments/NBB.Payments.Application/CommandHandlers · high confidence
Added internal expression builder for Entity Framework primary key queries
The data access layer now includes an internal \ExpressionBuilder\ and its \IExpressionBuilder\ interface to dynamically construct LINQ expressions for filtering entities by their primary key properties. This component translates provided key values into efficient \WHERE\ clauses compatible with Entity Framework Core, supporting both single and composite primary keys.
src/Data/NBB.Data.EntityFramework/Internal · high confidence
Added legacy NBB4 compatibility data contracts
The NBB.Application.DataContracts package now provides legacy base classes (Command, Command\<TResponse\>) and CommandMetadata, marked as obsolete, to ensure compatibility with published language assemblies compiled against NBB4. These classes implement MediatR's IRequest and IRequest\<TResponse\> interfaces, allowing projects referencing older NBB4.x assemblies to link correctly without requiring immediate refactoring of the dependent services.
src/Application/NBB.Application.DataContracts · high confidence
Adds default HTTP tenant identification service registration
Users can now register a default multi-tenancy identification strategy for HTTP requests by calling the new \AddDefaultHttpTenantIdentification\ extension method. This single registration automatically configures the tenant identification service to resolve tenant IDs from three sources: the JWT claim 'tid', the HTTP header 'TenantId', and the query string parameter 'tenantId'.
src/MultiTenancy/NBB.MultiTenancy.Identification.Http/Extensions · high confidence
Backward-compatible topic resolution for NBB 4 messaging patterns
The NBB.Messaging.BackwardCompatibility package now provides a configurable decorator that adapts topic resolution to NBB 4 naming conventions. When enabled via the 'Messaging:TopicResolutionCompatibility' configuration (or left at the default 'NBB\_4'), it prefixes command topics with 'ch.commands.', event topics with 'ch.events.', and other message types with 'ch.messages.', ensuring compatibility with legacy topic structures. This feature requires the presence of an IContractKindClassifier, which is provided by either the Mediator or MediatR integration packages.
src/Messaging/NBB.Messaging.BackwardCompatibility · high confidence
In-process messaging transport registration
The in-process messaging transport is now registered in the dependency injection container via the new AddInProcessTransport extension method. This registers the InProcessMessagingTransport as the implementation for both IMessagingTransport and ITransportMonitor, along with the underlying Storage service, enabling immediate use of in-process messaging without additional configuration.
src/Messaging/NBB.Messaging.InProcessMessaging/Extensions · high confidence
Initial Contracts sample with event-sourced domain and dual transport support
The NBB.Contracts sample is introduced, providing a reference implementation of a contract management microservice. The architecture uses event sourcing for the write model (persisting Contract aggregates via an EventStore) and a separate SQL read model (synced via domain event handlers) to serve API queries. The Contracts API exposes endpoints to create, view, and validate contracts, publishing commands to a message bus. The worker processes these commands and domain events, supporting both JetStream and Rusi transports via configuration, and includes OpenTelemetry metrics for contract creation and validation.
samples/MicroServices/NBB.Contracts · high confidence
Initial Event Store implementation with DI and serialization
This change introduces the core NBB.EventStore implementation, providing the \EventStore\ and \SnapshotStore\ classes that handle appending, retrieving, and deleting event streams as well as managing aggregate snapshots. It includes a dependency injection extension (\AddEventStore\) for registering these services, along with an \EventStoreOptionsBuilder\ that allows users to configure the JSON serialization (defaulting to Newtonsoft.Json) and add custom service extensions. The package also defines the necessary data contracts, such as \EventDescriptor\ and \SnapshotDescriptor\, and interfaces like \IEventRepository\ and \ISnapshotRepository\ to abstract the underlying storage mechanism.
src/EventStore/NBB.EventStore · high confidence
Initial Invoices API controller with event-sourced messaging
The InvoicesController is introduced to expose the invoice domain via an HTTP API. It supports retrieving all invoices or a specific invoice by ID, and allows creating new invoices or processing existing ones. Instead of direct database writes for mutations, the controller publishes commands (CreateInvoice, ProcessInvoice) to an IMessageBusPublisher, indicating an event-sourced or message-driven architecture. The API endpoints are mapped under /api/invoices.
samples/MicroServices/NBB.Invoices/NBB.Invoices.Api/Controllers · high confidence
Initial SQL scripts for EventStore AdoNet provider
This change introduces the foundational SQL scripts for the NBB.EventStore.AdoNet provider, enabling database operations for event sourcing. The scripts define the schema for \EventStoreEvents\ and \EventStoreSnapshots\ tables, including necessary indexes and table types, and provide rerunnable creation and deletion logic. Functionality includes appending events with optimistic concurrency checks (both strict version and retry-any versions), retrieving events and snapshots with version filtering, setting snapshots with conflict detection, and deleting entire streams.
src/EventStore/NBB.EventStore.AdoNet/Internal/SqlScripts · high confidence
Initial data access layer for the Invoices microservice
This change introduces the foundational data access components for the NBB.Invoices service. It adds a new \InvoicesDbContext\ configured with Entity Framework Core to map the \Invoice\ domain entity to a SQL Server database, and provides \DependencyInjectionExtensions\ to register both standard CRUD/query repositories for invoices and an event-sourced repository for \InvoiceLock\ objects, enabling the service to persist and retrieve invoice data.
samples/MicroServices/NBB.Invoices/NBB.Invoices.Data, samples/MicroServices/NBB.Payments/NBB.Payments.Data · high confidence
Initial database migration tooling for the Invoices microservice
This change introduces the \NBB.Invoices.Migrations\ project, providing the infrastructure to initialize and update the Invoices service's SQL Server database. It includes an Entity Framework Core initial migration that creates the \Invoices\ table, a \Migrator\ class that applies these migrations and sets up the associated EventStore objects, and a console application entry point to execute the process. The tooling is configured to run via Docker and integrates with the Aspire hosting model.
samples/MicroServices/NBB.Invoices/NBB.Invoices.Migrations · high confidence
Initial database schema for the payments microservice
The payments microservice now includes the initial Entity Framework Core migration files, establishing the foundational database structure. This adds a 'Payables' table to track financial obligations (including amount, client, invoice, and contract references) and a 'Payments' table to record payment events, linked via a one-to-one relationship with cascade deletion. This change provides the necessary data layer for the orchestration sample.
samples/MicroServices/NBB.Payments/NBB.Payments.Migrations/Migrations · high confidence
Initial domain model for the Contracts service
The Contracts service now includes its core domain entities and events. The \Contract\ aggregate root manages contract lifecycle states (creation, validation) and line items, utilizing an event-sourced pattern with snapshots. New domain events (\ContractCreated\, \ContractAmountUpdated\, \ContractLineAdded\, \ContractValidated\) are defined to capture state changes, and a \Product\ record is introduced to represent line item details. An integration event for contract validation is also published for cross-service communication.
NBB.Contracts · high confidence
Initial release of ASP.NET correlation middleware and Serilog enricher
This change introduces the NBB.Correlation.AspNet package, which provides an ASP.NET middleware (\UseCorrelation\) that extracts a correlation ID from the \x-correlation-id\ HTTP header or the \correlationId\ query string parameter, generating a new ID if none is present. It also introduces the NBB.Correlation.Serilog package, containing a log event enricher that attaches the current correlation ID to structured Serilog logs.
src/Correlation/NBB.Correlation.AspNet · high confidence
Initial release of MicroServices sample with Aspire and Kubernetes support
The MicroServices sample is now available, demonstrating a multi-service architecture (Contracts, Invoices, Payments, and Orchestration) using NBB. Users can run the entire stack locally via an Aspire AppHost, which provides a dashboard for logs, traces, and metrics, and supports swapping the C\# Invoices service for an F\# implementation. The sample also includes infrastructure-as-code for Kubernetes deployment, with PowerShell scripts to build, push container images, and apply Kubernetes manifests for the services, workers, and migrations.
samples/MicroServices · high confidence
Initial release of NBB.Domain with core domain primitives
This change introduces the NBB.Domain package, providing foundational domain-driven design components. It includes an abstract Entity base class with identity-based equality and hashing, an Enumeration class for strongly-typed constants with value lookup, and an Identity record type. Additionally, it adds a DomainException for error handling and a JSON converter to serialize SingleValueObject types, enabling users to build structured domain models.
src/Domain/NBB.Domain · high confidence
Initial release of NBB.EventStore.Abstractions
This change introduces the core abstractions for the event sourcing library, providing the foundational interfaces and types needed to integrate event storage into applications. It defines the \IEventStore\ interface for appending and retrieving events from streams, as well as the \ISnapshotStore\ interface for managing aggregate snapshots. To support these capabilities, the package includes the \SnapshotEnvelope\ data contract, extension methods for generating stream identifiers from entities (\IdentifiedEntityExtensions\), a \NullSnapshotStore\ implementation for scenarios where snapshotting is not required, and an \EventStoreUowDecorator\ that automatically persists domain events to the stream upon saving changes.
src/EventStore/NBB.EventStore.Abstractions, src/Messaging/NBB.Messaging.Abstractions · high confidence
Initial release of NBB.Invoices sample microservices
This change introduces the NBB.Invoices sample, providing the foundational code for both the API service and the background Worker. The API service is configured to expose controllers, integrate with a JetStream message bus, and handle read-side data access, while the Worker service is set up to process commands and events via MediatR, manage domain events through an EventStore, and apply unit-of-work decorators for transactional consistency. Both services include Docker configurations and default connection settings for local development.
samples/MicroServices/NBB.Invoices/NBB.Invoices.Worker · high confidence
Initial release of the NBB.Mono monolithic sample application
This change introduces the NBB.Mono sample, a monolithic .NET application that demonstrates the NBB framework's capabilities in a single deployment unit. It includes the full application startup configuration (Program.cs, Startup.cs), Dockerfile for containerization, and configuration files (appsettings.json). The sample integrates core NBB features including MediatR for command/query handling, an in-process message bus, EventStore for event sourcing, and Process Managers for orchestration. It also sets up logging with Serilog and SQL Server, correlation ID support, and dependency injection decorators for unit of work patterns.
samples/Monolith/NBB.Mono · high confidence
Initial release of the Payments Worker service
The NBB.Payments.Worker is introduced as a background host application responsible for processing payments. It configures a messaging infrastructure using JetStream for communication, integrates with an EventStore for persistence, and utilizes MediatR to handle commands and events. The service includes middleware for correlation, exception handling, and resiliency, and registers unit-of-work decorators to manage domain events and database transactions.
samples/MicroServices/NBB.Payments/NBB.Payments.Worker · high confidence
Introduce ADO.NET Event and Snapshot Repositories with Multi-Tenancy Support
This change adds the \NBB.EventStore.AdoNet\ package, providing ADO.NET-based implementations for the Event and Snapshot repositories backed by Microsoft SQL Server. It introduces \AdoNetEventRepository\ and \AdoNetSnapshotRepository\ for persisting and loading event stream data, along with an options builder (\EventStoreAdoNetOptionsBuilder\) to configure connection strings via configuration or tenant context. Additionally, the \NBB.EventStore.AdoNet.Multitenancy\ package provides multi-tenant variants (\AdoNetMultiTenantEventRepository\, \AdoNetMultitenantSnapshotRepository\) that automatically filter queries by tenant ID using \ITenantContextAccessor\, enabling data isolation in multi-tenant deployments.
src/EventStore/NBB.EventStore.AdoNet · high confidence
Introduce CorrelationManager for tracking correlation IDs
The NBB.Correlation package now provides a CorrelationManager that allows applications to create and manage correlation scopes. Users can generate a new correlation ID (or provide an existing one) via CorrelationManager.NewCorrelationId, which returns a disposable scope that automatically clears the ID upon disposal. The current correlation ID can be retrieved at any time using CorrelationManager.GetCorrelationId, returning null if no scope is active.
src/Correlation/NBB.Correlation · high confidence
Introduce Entity Framework Core data access implementations
The NBB.Data.EntityFramework package now provides concrete implementations for the data access abstractions, including EfCrudRepository, EfReadOnlyRepository, EfQuery, and EfUow. These components enable generic CRUD operations, read-only queries with eager loading and pagination, and unit-of-work management via Entity Framework Core. Registration is simplified through extension methods such as AddEntityFrameworkDataAccess, AddEfCrudRepository, AddEfReadOnlyRepository, AddEfQuery, and AddEfUow, allowing developers to wire up specific entity-context pairs in their dependency injection container.
src/Data/NBB.Data.EntityFramework · high confidence
Introduce F\# application mediator with command, query, and event pipelines
The NBB.Application.Mediator.FSharp package now provides a mediator for F\# projects, enabling the registration of command, query, and event pipelines via \IServiceCollection.AddMediator\. This allows developers to send commands, dispatch events, and execute queries through a unified interface that supports middleware composition and handler selection.
src/Application/NBB.Application.Mediator.FSharp · high confidence
Introduce JetStream messaging transport via NATS.Net
Added a new JetStream-based messaging transport implementation that integrates with the NATS ecosystem using the NATS.Net library. This change introduces dependency injection support via \AddJetStreamTransport\, allowing users to configure connection parameters such as NATS URL, client ID, and various timeouts (connect, command, request) through application configuration. The transport manages message publishing and subscribing by leveraging NATS connection pools and JetStream contexts, supporting durable consumers, explicit acknowledgments, and configurable delivery policies.
Messaging, src/Messaging/NBB.Messaging.JetStream · high confidence
Introduce MediatR effects integration
The NBB.Application.MediatR.Effects package now provides a way to wrap MediatR requests and notifications as side effects. Users can register the integration via the new AddMediatREffects() extension method, which registers scoped handlers for queries, commands, and notifications. The MediatorEff class exposes Send and Publish methods to create effects that delegate to the MediatR IMediator, while the legacy Mediator class and AddMediatorEffects method are marked obsolete and will be removed in NBB 11.
src/Application/NBB.Application.MediatR.Effects · high confidence
Introduce Mediator adapter packages for application, messaging, and process management
New adapter packages have been added to support the source-generated Mediator library alongside the existing MediatR integration. For application logic, NBB.Application.Mediator provides an event publisher and contract classifier, while NBB.Application.Mediator.Effects allows sending requests and publishing notifications via side effects. In messaging, NBB.Messaging.Mediator adds a pipeline middleware to dispatch messages and enables subscriber discovery from Mediator handler registrations. For orchestration, NBB.ProcessManager.Mediator registers notification handlers for process manager definitions and integrates with the new effects, ensuring that applications can switch from MediatR to Mediator without changing their effect-based code.
(repo-wide) · high confidence
Introduce NBB.Core.Effects for pure, composable side-effect management
The NBB.Core.Effects library is introduced to enable pure, type-safe, and composable asynchronous programming by representing side effects at the type level without executing them immediately. This change adds a core Effect system with monadic composition (Bind, Map/Then), sequencing, and parallel execution capabilities, alongside built-in handlers for TryWith (exception handling) and TryFinally (compensation). It provides a DI-friendly registration model via \AddEffects\ and \AddSideEffectHandler\ extensions, allowing developers to register custom side-effect handlers and interpret effect chains iteratively through the \Interpreter\ service.
src/Core/NBB.Core.Effects · high confidence
Introduce NBB.Core.Pipeline library for configurable middleware chains
Adds the NBB.Core.Pipeline package, providing a generic pipeline builder that implements the Chain of Responsibility pattern. Users can now construct asynchronous processing chains by registering middleware via a fluent API, supporting both inline functions and class-based middleware with dependency injection through the context's service provider.
src/Core/NBB.Core.Pipeline · high confidence
Introduce NBB.Data.EventSourcing package for event-sourced repositories
Added the NBB.Data.EventSourcing package, which provides an EventSourcedRepository to manage persistence and loading of event-sourced aggregates. The repository handles saving uncommitted events to an IEventStore with concurrency control, automatically managing snapshots via an ISnapshotStore based on configurable frequency (defaulting to 10), and publishing events in-process using an IEventPublisher. Dependency injection extensions allow registering the data access layer and specific aggregate repositories, with options to customize snapshot frequency.
src/Data/NBB.Data.EventSourcing · high confidence
Introduce NBB.Messaging.Host for resilient, pipeline-based message processing
This change introduces the NBB.Messaging.Host package, providing a background service that manages the lifecycle of messaging subscribers through a configurable pipeline. Users can now register subscribers with specific options and middleware chains (e.g., correlation, exception handling, resiliency) via the \IMessagingHostBuilder\. The host includes built-in resilience features such as configurable retry strategies and restart delays, automatic correlation ID propagation across published messages, and a health check implementation to monitor the running state of the messaging infrastructure.
src/Messaging/NBB.Messaging.Host · high confidence
Introduce Process Manager runtime with event-sourced state and timeout support
The NBB.ProcessManager.Runtime package now provides the execution engine for process managers, enabling users to define workflows that persist their state via an event store and handle timeouts. The runtime registers a ProcessExecutionCoordinator that loads instances from an IInstanceDataRepository, applies events to update state, and saves uncommitted changes back to the store. It includes a built-in timeout system with a background service that polls for due timeouts and publishes messages, along with handlers to request and cancel timeouts. Users can register their process definitions and the runtime infrastructure via the AddProcessManager DI extension.
src/Orchestration/NBB.ProcessManager.Runtime · high confidence
Introduce ProjectR functional read-model projection library with MediatR and Mediator adapters
Adds the NBB.ProjectR library, enabling functional-style read-model projections (inspired by Elm) that process events and maintain state via an event-sourced store. The core NBB.ProjectR package provides the projector interfaces, metadata scanning, and projection store implementation. Additionally, two new adapter packages are introduced: NBB.ProjectR.MediatR and NBB.ProjectR.Mediator, which register dependency-injection handlers to dispatch events from the respective notification systems to the projectors, allowing seamless integration with existing MediatR or Mediator setups.
src/Projections · high confidence
Introduce Rusi as a gRPC-based messaging transport
This change adds a new messaging transport implementation for the Rusi service, enabling applications to publish and subscribe to topics via gRPC. The \RusiMessagingTransport\ handles message publishing by filtering out null-valued headers and defaults the pub/sub name to an empty string if not configured. Subscriptions are established using a streaming gRPC client with configurable retry policies (retrying on Unavailable, Unknown, DeadlineExceeded, and Aborted statuses) and an asynchronous acknowledgment channel to manage message delivery confirmations. Configuration is provided via \RusiOptions\, binding to the \Messaging.Rusi\ configuration section and supporting the \RUSI\_GRPC\_PORT\ environment variable.
src/Messaging/NBB.Messaging.Rusi · high confidence
Introduce data repository abstractions and event publishing unit of work
The NBB.Data.Abstractions package now provides core interfaces for data access, including ICrudRepository, IReadOnlyRepository, IEventSourcedRepository, and IUowRepository, along with a unit-of-work extension method for saving changes. Additionally, a new EventPublishingUowDecorator automatically publishes uncommitted entity changes via IEventPublisher after a save operation, enabling event-driven updates without manual orchestration.
src/Data/NBB.Data.Abstractions · high confidence
Introduce default tenant token resolver and exception type
The multi-tenancy identification layer now includes a default implementation for tenant token resolution. A new \ITenantTokenResolver\ interface defines the contract for retrieving a tenant token, and \DefaultTenantTokenResolver\ provides a concrete implementation that returns a configured default tenant ID as a string. Additionally, a \CannotResolveTokenException\ class has been added to handle scenarios where tenant identification fails.
src/MultiTenancy/NBB.MultiTenancy.Identification/Resolvers · high confidence
Introduce effect-based message publishing
The messaging library now supports publishing messages through a new effect system. Users can register the messaging effects via the new \AddMessagingEffects\ extension method, which wires up the \PublishMessage\ handler. The \MessageBus\ class provides a static \Publish\ method that returns an effect, allowing message publishing to be handled as a side effect within the application's effect interpreter.
src/Messaging/NBB.Messaging.Effects · high confidence
Introduce event-sourced invoice domain model with locking capability
The NBB.Invoices domain now implements the Invoice aggregate as an event-sourced entity that raises domain events (InvoiceCreated, InvoicePayed) upon state changes, and includes a dedicated InvoiceLock aggregate to manage concurrent access with configurable timeouts. Additionally, integration event contracts are defined in the PublishedLanguage layer to expose these state changes to external systems.
NBB.Invoices · high confidence
Introduce in-memory event and snapshot repositories
The new NBB.EventStore.InMemory package provides in-process implementations of the event and snapshot repositories, enabling their use as test doubles in integration tests. Users can register these components via the \UseInMemoryEventRepository\ extension method, which wires up the \InMemoryRepository\ and \InMemorySnapshotRepository\ into the dependency injection container.
src/EventStore/NBB.EventStore.InMemory · high confidence
Introduce in-process messaging transport with internal storage
This change adds the internal implementation for in-process messaging, introducing the \InProcessMessagingTransport\ class which implements \IMessagingTransport\ and \ITransportMonitor\. It relies on a new \IStorage\ interface and its \Storage\ implementation to manage message queues and subscriptions within the application process. Users benefit from a lightweight, zero-dependency messaging layer that handles message publishing and subscription via in-memory concurrent queues and auto-reset events, including basic error logging and cancellation token support.
src/Messaging/NBB.Messaging.InProcessMessaging/Internal · high confidence
Introduce multi-tenancy support for Entity Framework Core
The NBB.Data.EntityFramework.MultiTenancy package now provides a complete solution for implementing multi-tenant data access in Entity Framework Core. Users can configure entities as multi-tenant using the \IsMultiTenant()\ extension, which automatically adds a \TenantId\ property and a global query filter to ensure data isolation. By deriving from \MultiTenantDbContext\ or applying the \SetTenantIdFromContext\ extension, the system automatically injects the current tenant's ID into new or modified entities during save operations and validates that entities are not saved with mismatched tenant IDs. The package supports shared database strategies and integrates with the existing \ITenantContextAccessor\ and \ITenantConfiguration\ abstractions.
src/Data/NBB.Data.EntityFramework.MultiTenancy · high confidence
Introduce multi-tenant identification strategy with pluggable resolvers
The NBB.MultiTenancy.Identification package now provides a structured approach to identifying tenants by combining token resolvers with identifiers. The new TenantIdentificationStrategy iterates through a list of configured ITenantTokenResolver implementations (such as JWT, HTTP header, or query string resolvers) to extract a tenant token, which is then passed to an ITenantIdentifier to resolve the final tenant ID. This allows applications to define a fallback chain for tenant identification, improving flexibility in how tenant context is obtained from various sources.
src/MultiTenancy/NBB.MultiTenancy.Identification · high confidence
Introduce tenant context switching with automatic restoration
The multi-tenancy context mechanism now supports explicit tenant switching via the new ITenantContextAccessor interface and TenantContextFlow struct. Users can change the active tenant context using ChangeTenantContext, which returns a disposable flow object that automatically restores the previous tenant context when disposed, ensuring thread-safe context management via AsyncLocal storage.
src/MultiTenancy/NBB.MultiTenancy.Abstractions/Context · high confidence
Introduces F\# effect computation expressions and operators
Adds the NBB.Core.Effects.FSharp library, providing F\#-specific wrappers for the core effect system. This includes \Lazy.effect\ and \Strict.effect\ computation expressions for composing effects, along with Haskell-style operators (\\<!\>\, \\<\*\>\, \\>\>=\, \\>=\>\) and utility modules for list and result traversal. It also provides an interpreter factory to integrate with dependency injection.
src/Core/NBB.Core.Effects.FSharp · high confidence
Introduces fluent API for selecting message types and topics
The messaging host now provides a fluent builder API (TypeSelector) to configure subscriber services. Users can select message types from specific assemblies, the calling/entry assembly, or a separate service collection, and filter them by base class or custom predicates. Additionally, specific message topics can be included in the subscriber configuration.
src/Messaging/NBB.Messaging.Host/Builder/TypeSelector · high confidence
Introduction of Domain Abstractions and Event-Sourcing Infrastructure
The Domain layer now provides a foundational set of interfaces and abstract classes to support event-sourced architectures. New abstractions in NBB.Domain.Abstractions define aggregate roots, including generic and event-sourced variants (IAggregateRoot, IEventedAggregateRoot, IEventSourcedAggregateRoot). Implementations in NBB.Domain introduce base classes like EventedAggregateRoot for managing uncommitted changes and EmitApplyAggregateRoot for applying events via reflection. Additionally, EventSourcedAggregateRoot adds support for loading state from history and handling snapshots via memento providers, while SingleValueObject offers a simplified record-based value object with a standard ToString implementation.
Domain · high confidence
Introduction of F\# Evented monad for effect tracking
Added a new \Evented\<'a, 'e\>\ type in the \NBB.Core.Evented.FSharp\ namespace that wraps a value with a list of events, enabling the composition of computations that produce side-effect events. This change introduces a full monadic implementation including \map\, \bind\, and \apply\ operations, along with an \EventedBuilder\ for using computation expressions. It also provides extension operators (\\<!\>\, \\<\*\>\, \\>\>=\, \\>=\>\) and utility functions for traversing and sequencing \Evented\ effects within \List\ and \Result\ contexts.
NBB.Core.Evented.FSharp · high confidence
Introduction of IInvoiceRepository interface with cancellation token support
The domain layer now includes the IInvoiceRepository interface, defining asynchronous methods (GetByIdAsync, AddAsync, SaveChangesAsync) that accept a CancellationToken with a default value. This enables callers to propagate cancellation requests to repository operations, improving responsiveness and resource management during invoice data access.
samples/MicroServices/NBB.Invoices/NBB.Invoices.Domain · high confidence
Introduction of Tenant entity with enabled/disabled state
The MultiTenancy module now includes a new Tenant record that models a tenant's identity and operational status. This entity exposes a TenantId, a Code, and a new Enabled boolean property (defaulting to true), allowing the system to distinguish between active and disabled tenants. It also provides an IsValid method to check for valid identifiers and a Default static instance for fallback scenarios.
MultiTenancy · high confidence
Introduction of domain abstraction interfaces and unit-of-work decorator
The NBB.Domain.Abstractions package now provides core DDD abstractions, including the ISnapshotableEntity interface for managing entity snapshots and the IEntity interface hierarchy. Additionally, a DomainUowDecorator has been added to wrap the unit of work, automatically marking changes as committed before saving to ensure version consistency for evented aggregate roots.
src/Domain/NBB.Domain.Abstractions · high confidence
Introduction of invoice command definitions
The PublishedLanguage sample now includes a Commands.cs file that defines the core domain commands for invoice management. Users can now see the structure for creating an invoice (with amount, client, and optional contract details), marking an invoice as paid, and processing an invoice, all implemented as MediatR IRequest records.
samples/MicroServices/NBB.Invoices/NBB.Invoices.PublishedLanguage · high confidence
Invoice domain events now publish to the message bus
The application now automatically publishes integration events to the message bus when an invoice is created or marked as paid. This change introduces the \InvoiceDomainEventHandlers\ class, which listens for \InvoiceCreated\ and \InvoicePayed\ domain events and forwards them as \PublishedLanguage.InvoiceCreated\ and \PublishedLanguage.InvoiceMarkedAsPayed\ messages, enabling downstream services to react to these state changes.
samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/DomainEventHandlers · high confidence
Multi-tenant messaging support with tenant context propagation and filtering
The NBB.Messaging.MultiTenancy package now provides infrastructure to support multi-tenancy in messaging. For publishers, the \AddMultiTenantMessaging\ extension registers a decorator that automatically attaches the current tenant ID to outgoing message headers and tracing tags, skipping this process in mono-tenant mode or for dead-letter queue messages. For consumers, the \TenantMiddleware\ identifies the tenant from incoming messages, loads the corresponding tenant context, and filters out events from unknown or disabled tenants while requiring valid tenant identification for commands and queries.
src/Messaging/NBB.Messaging.MultiTenancy · high confidence
Multitenant AdoNet Event Store database schema and scripts
The multitenant AdoNet Event Store implementation now includes the underlying SQL scripts and resource configuration required to manage tenant-isolated data. This adds the \Scripts\ class to load embedded SQL resources and introduces specific database objects: \EventStoreEvents\ and \EventStoreSnapshots\ tables, along with a \NewEventStoreEvents\ table type. The included scripts support creating and dropping these database objects, retrieving events and snapshots by stream and tenant, setting snapshots with version checks, appending events with both strict and optimistic concurrency control, and deleting streams.
src/EventStore/NBB.EventStore.AdoNet.Multitenancy/Internal · high confidence
New AdoNet Event Store database migration tool
A new \NBB.EventStore.AdoNet.Migrations\ package has been introduced to handle the creation and dropping of database objects for the AdoNet event store. This tool exposes \CreateDatabaseObjectsAsync\ and \DropDatabaseObjectsAsync\ methods, allowing users to initialize or reset the event store schema. It supports both single-tenant and multi-tenant configurations via the \MultiTenancy\ appsettings section and uses \Microsoft.Data.SqlClient\ for database connectivity.
src/EventStore/NBB.EventStore.AdoNet.Migrations · high confidence
New F\# implementation of the Invoices API sample
A new F\#-based API sample has been added for the Invoices microservice, mirroring the existing C\# implementation. This sample uses the Giraffe web framework to expose the same invoice management endpoints (GET, POST) and integrates with the NBB messaging infrastructure via JetStream, providing a functional-style alternative for users exploring the sample architecture.
samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Api · high confidence
New F\# implementation of the Invoices microservice
A new F\# version of the Invoices microservice has been added to the samples, providing a drop-in replacement for the existing C\# service. This implementation uses the NBB mediator pattern to handle commands (create, mark as paid, process) and queries, while translating between the shared published language and internal domain events. It persists data to SQL Server using the same database schema as the C\# service, allowing it to share the \Invoices\ table and integration events seamlessly.
samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp · high confidence
New HTTP-based tenant token resolvers
The NBB.MultiTenancy.Identification.Http package now provides a suite of implementations for the ITenantTokenResolver interface, allowing tenant identification from various HTTP request sources. Users can now resolve tenant tokens from form values (FormTokenResolver), specific HTTP headers (HeaderHttpTokenResolver), query string parameters (QueryStringHttpTokenResolver), the request host (HostHttpTenantTokenResolver), the Referer header (HostRefererHttpTokenResolver), or by extracting a claim from a JWT Bearer token (JwtBearerTokenResolver). A regex-based header resolver (HeaderRegexHttpTokenResolver) is also included for pattern matching. The package includes a default strategy registration method that attempts to identify the tenant via the 'TenantId' header first, falling back to the 'tenantId' query string parameter.
src/MultiTenancy/NBB.MultiTenancy.Identification.Http · high confidence
New NBB.EventStore.Effects package for event store operations
The new NBB.EventStore.Effects package introduces side-effect wrappers for event store interactions, allowing users to append events to streams, retrieve events from streams, and delete streams using the NBB effects infrastructure. Users must register the effects via services.AddEventStoreEffects() in their composition root to enable these operations.
src/EventStore/NBB.EventStore.Effects · high confidence
New Serilog enrichers and OpenTelemetry tracing sink
Added three new Serilog components to enhance observability: the ServiceIdentifier enricher automatically tags logs with the application's entry assembly name or messaging source; the TenantId enricher adds tenant context (ID and code) to log events, respecting mono-tenant configurations; and the OpenTelemetry tracing sink bridges Serilog with OpenTelemetry by attaching log messages as events to the current activity, including a filter to exclude noisy framework logs like Entity Framework and ASP.NET Core hosting.
src/Tools · high confidence
New command handlers for invoice creation, payment, and processing with event-sourced locking
The application layer now includes three new command handlers: CreateInvoiceCommandHandler, MarkInvoiceAsPayedCommandHandler, and ProcessInvoiceCommandHandler. These handlers implement the core invoice lifecycle operations—creating an invoice, marking it as paid, and processing it—using the Mediator library for command dispatch. The ProcessInvoiceCommandHandler introduces a specific behavioral change by implementing an event-sourced locking mechanism (InvoiceLock) to ensure concurrency control during invoice processing, preventing concurrent modifications through a retry loop on concurrency exceptions.
samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/CommandHandlers · high confidence
New core abstractions and F\# functional data types
This change introduces a new set of foundational abstractions in NBB.Core.Abstractions and a new F\# library in NBB.Core.FSharp. The abstractions package adds interfaces and types for CQRS contract classification (Command, Query, Event), unit-of-work and event publishing patterns, concurrency error handling, paging, and OpenTelemetry activity status management. The FSharp package provides monadic computation expressions for Reader, State, and ReaderState effects, along with utility modules for Result and List traversals.
src/Core/NBB.Core.Abstractions · high confidence
New dependency injection helpers for constrained decorators and registration validation
The NBB.Core.DependencyInjection package now provides utilities to simplify service registration in the Microsoft.Extensions.DependencyInjection container. Users can apply constrained generic decorators via the new \DecorateOpenGenericWhen\ extension, allowing decorators to be applied only to specific generic implementations based on a predicate. Additionally, the package introduces \RequireRegistration\ and \RequireNonSingletonLifetime\ extensions, which validate that specific services are registered and do not use a Singleton lifetime when the generic host starts, failing fast with clear error messages if requirements are not met.
src/Core/NBB.Core.DependencyInjection · high confidence
New monolithic migration tool for database and event store setup
A new console application has been added to orchestrate database migrations for the Contracts, Invoices, and Payments modules, as well as to recreate Event Store objects. This tool allows users to apply the latest schema changes and initialize the event store infrastructure in a single execution, configured via standard connection strings in appsettings.json.
samples/Monolith/NBB.Mono.Migrations · high confidence
New multi-tenancy abstractions for logging, error handling, and configuration
The NBB.MultiTenancy.Abstractions package now includes core abstractions to support multi-tenant applications. A new TenantLogScope class enables automatic inclusion of TenantId and TenantCode in structured logging contexts. A TenantNotFoundException exception type is provided to handle cases where a tenant cannot be identified. Additionally, the package introduces ITenantConfiguration (derived from IConfiguration) with extensions for retrieving connection strings and typed values, along with service registration helpers to manage tenant-specific configuration merging.
src/MultiTenancy/NBB.MultiTenancy.Abstractions · high confidence
New multi-tenancy configuration abstraction and tenant-specific settings
This change introduces a new configuration layer for multi-tenancy in the \NBB.MultiTenancy.Abstractions\ project. It adds a \TenantConfiguration\ implementation that merges tenant-specific settings with global defaults, allowing applications to retrieve connection strings and other configuration values specific to the current tenant. The update includes a \MergedConfigurationSection\ to handle this merging logic, extension methods for retrieving typed configuration values and connection strings (with validation for connection string parts), and a \TenantInfrastructure\ component to fetch connection strings for all tenants. Additionally, it provides a helper extension \IsMultiTenant\ to check the tenancy type from the configuration.
src/MultiTenancy/NBB.MultiTenancy.Abstractions/Configuration · high confidence
New multi-tenant Todo List sample with Aspire orchestration
A new multi-tenant Todo List sample has been added to the \samples/MultiTenancy\ directory, demonstrating a split architecture with a Web API (\NBB.Todo.Api\) and a messaging worker (\NBB.Todo.Worker\) sharing a database via NATS JetStream. The sample includes a dedicated migrations project (\NBB.Todo.Migrations\) that runs in a mono-tenant context to initialize the schema, while the API and worker operate in a multi-tenant mode, identifying tenants via HTTP headers and message metadata. It is designed to be run locally using .NET Aspire (\NBB.Todo.AppHost\), which orchestrates the SQL Server database, NATS JetStream, and the application services, complete with health checks and dependency management.
samples/MultiTenancy · high confidence
New multi-tenant repository abstraction with configuration-based storage and caching
This location introduces the core repository interface and implementations for multi-tenancy. It adds ITenantRepository with methods to retrieve tenants by ID, host, or list all enabled tenants. It provides ConfigurationTenantRepository, which loads tenant definitions from the 'MultiTenancy' configuration section (supporting both mono-tenant and multi-tenant modes) and filters out disabled tenants. It also adds CachedTenantRepositoryDecorator, which wraps any ITenantRepository implementation to cache tenant lookups in distributed memory for 3 minutes, reducing backend calls. Finally, it includes DependencyInjectionExtensions to register the tenant repository and optionally enable caching via decorator pattern.
src/MultiTenancy/NBB.MultiTenancy.Abstractions/Repositories · high confidence
New schema generation and MediatR integration packages
This change introduces two new packages to the application layer. The NBB.Application.DataContracts.Schema package provides a JsonSchemaResolver that generates JSON schemas and sample data for CLR types, enabling runtime schema publishing via messaging. The NBB.Application.MediatR package implements core application ports using MediatR, registering an IEventPublisher that publishes INotification events and a IContractKindClassifier that distinguishes between Commands, Queries, and Events based on MediatR interfaces. Additionally, the legacy MediatorUowDecorator is marked obsolete in favor of the standard EventPublishingUowDecorator.
src/Application/NBB.Application.DataContracts.Schema · high confidence
New tenant identification strategies via interface and implementations
The multi-tenancy identification layer now exposes an ITenantIdentifier interface with two concrete strategies: HostTenantIdentifier, which resolves a tenant ID by looking up the host name via ITenantRepository, and IdTenantIdentifier, which parses a GUID string directly. This allows the application to identify tenants based on either the request host or an explicit tenant ID token.
src/MultiTenancy/NBB.MultiTenancy.Identification/Identifiers · high confidence
New timeout management side effects for process instances
Process managers can now explicitly request and cancel timeouts for specific instance IDs. This change introduces new side-effect types (RequestTimeout, CancelTimeouts) and a static Timeout helper class, allowing workflows to schedule messages to be delivered after a specified duration or to cancel previously scheduled timeouts.
src/Orchestration/NBB.ProcessManager.Definition/SideEffects · high confidence
OpenTelemetry integration for messaging publishers and subscribers
The NBB.Messaging.OpenTelemetry package now provides distributed tracing support for message bus operations. Publishers automatically create producer spans tagged with the destination topic and correlation ID, while injecting trace context into message headers for downstream services. Subscribers create consumer spans that link back to the publisher via 'follows\_from' references, capturing peer service information and envelope headers. Users can enable this instrumentation by registering the OpenTelemetryPublisherDecorator in DI and adding the UseOpenTelemetry middleware to the messaging pipeline, or by calling AddMessageBusInstrumentation on the TracerProviderBuilder.
src/Messaging/NBB.Messaging.OpenTelemetry · high confidence
Payment domain events are published to the message bus
The application now automatically publishes integration events when payment-related domain events occur. Specifically, when a payment is received or a payable is created, the system publishes corresponding messages (PaymentReceived and PayableCreated) to the message bus, enabling other services to react to these financial state changes.
samples/MicroServices/NBB.Payments/NBB.Payments.Application/DomainEventHandlers · high confidence
Repository initialization with .NET 10 tooling and solution structure
The repository is initialized with a comprehensive project structure targeting .NET 10, including a new \NBB.slnx\ solution file and multiple solution filters (\.slnf\) for Core, Effects, EventStore, Messaging, ProcessManager, and Samples. The build configuration is standardized via \Directory.Build.props\ and \dependencies.props\, which define package versions for .NET 10 libraries (Microsoft.Extensions, EntityFrameworkCore), OpenTelemetry 1.17, MediatR 12.5.0, and other dependencies. Essential developer tooling files such as \.editorconfig\, \.gitignore\, and \.dockerignore\ are added, alongside a PowerShell \Build.ps1\ script for building, testing, and packing. The project is licensed under MIT, and documentation files (README, CONTRIBUTING, CODE\_OF\_CONDUCT) are included.
(repo-wide) · high confidence
Behavioural changes
Added legacy Event and EventMetadata data contracts for NBB4 compatibility
The Application layer now includes the Event and EventMetadata classes in the NBB.Application.DataContracts namespace. These types implement INotification and are marked as obsolete to ensure backward compatibility with NBB4, guiding users to use INotification directly instead.
Application · high confidence
Introduce fluent API for multi-tenant identification service registration
The multi-tenancy identification module now uses a new fluent builder pattern for service configuration. Developers register the core \ITenantIdentificationService\ via \AddTenantIdentificationService()\ and then chain \AddTenantIdentificationStrategy\ calls to define how tenant IDs are resolved. This replaces previous registration methods with a structured approach that supports both typed identifiers and custom factories, allowing multiple resolution strategies to be combined and executed in sequence.
src/MultiTenancy/NBB.MultiTenancy.Identification/Extensions · high confidence
Introduce fluent ProcessManager definition API with event correlation and effect builders
The ProcessManager definition API has been redesigned to use a fluent builder pattern, allowing users to define process behavior through \StartWith\ and \When\ chains. This new structure introduces explicit event correlation via \EventCorrelationBuilder\ (supporting correlation by ID or custom selectors), enabling precise routing of events to process instances. It also provides a simplified effect system with extension methods like \SendCommand\, \Schedule\, and \PublishEvent\ to declaratively define side effects, state transitions, and timeouts within the process lifecycle.
src/Orchestration/NBB.ProcessManager.Definition/Builder · high confidence
Introduces domain events for payable creation and payment receipt
The NBB.Payments domain now exposes specific domain events to track the lifecycle of payables. A new \PayableCreated\ event is emitted when a payable is instantiated, and a \PaymentReceived\ event is emitted when the \Pay()\ method is called on an existing payable. These events, defined as records implementing \INotification\ from the Mediator library, are also published in the \NBB.Payments.PublishedLanguage\ namespace to facilitate integration scenarios, allowing external systems to react to these financial state changes.
NBB.Payments · high confidence
Messaging host restart and execution monitoring improvements
The messaging host now includes an ExecutionMonitor to track active message handlers, ensuring that subscriptions are properly managed during lifecycle events. A new ScheduleRestart mechanism allows the host to gracefully stop and restart after a configurable delay, addressing previous issues with host restart stability. Additionally, the host implements retry policies for start failures and handles transport errors by either retrying or shutting down the application based on configuration.
src/Messaging/NBB.Messaging.Host/Internal · high confidence
Messaging pipeline now includes correlation, resiliency, and validation middleware
The messaging host pipeline now integrates several new middleware components to improve message processing reliability and observability. A correlation middleware automatically creates a correlation scope from message headers, enabling better tracing. A default resiliency middleware handles concurrency and out-of-order message exceptions with specific retry policies. An exception handling middleware logs errors and routes failed messages to a dead-letter queue. Additionally, a schema validator middleware enforces the presence of Source and CorrelationId headers on outgoing messages, and extension methods are provided to easily wire these components into the pipeline.
src/Messaging/NBB.Messaging.Host/MessagingPipeline · high confidence
MicroServices sample now runs on .NET Aspire
The MicroServices sample has been updated to use .NET Aspire for local development and orchestration. The AppHost project now defines the distributed application topology, including SQL Server databases, NATS JetStream messaging, and the Contracts, Invoices, and Payments services, with automatic health checks and dependency ordering. A new ServiceDefaults project provides shared configuration for OpenTelemetry observability, service discovery, resilience, and health checks across all sample services. Users can now launch the entire microservices stack via the Aspire dashboard.
samples/MicroServices/NBB.MicroServices.AppHost, samples/NBB.Samples.ServiceDefaults · high confidence
Redesigned messaging host configuration API with pipeline and subscriber grouping
The messaging host builder has been redesigned to support a fluent configuration API that allows users to define multiple subscriber groups, each with its own set of message types, transport options, and processing pipelines. Users can now register subscribers using \AddSubscriberServices\, configure specific options like dynamic deserialization via \WithOptions\, and attach type-specific middleware pipelines using \UsePipeline\. This change introduces a structured approach to hosting messaging services, replacing previous ad-hoc registration patterns with a more explicit, grouped, and pipeline-driven model.
src/Messaging/NBB.Messaging.Host/Builder · high confidence
Test coverage
Added EventStore performance benchmarks; Added F\# sample tests for Reader, State, and ReaderState monads; Added benchmarks for F\# effect computation expressions; Added integration tests for EventStore and SnapshotStore concurrency; Added integration tests for Rusi transport subscription disposal; Added unit tests for AdoNet EventStore configuration binding; Added unit tests for Entity Framework Core multi-tenancy behavior; Added unit tests for EventSourcedRepository and ExpressionBuilder; Added unit tests for EventStore serialization, stream operations, and snapshots; Added unit tests for F\# Application Mediator pipelines; Added unit tests for F\# Evented workflow and list operations; Added unit tests for F\# effect computation expressions; Added unit tests for HTTP effects registration and execution; Added unit tests for HTTP tenant token resolvers and identification strategy; Added unit tests for Host and ID tenant identifiers; Added unit tests for InMemoryRepository stream operations; Added unit tests for MediatR and Mediator adapter integrations; Added unit tests for MediatR effects integration; Added unit tests for NBB Domain core abstractions; Added unit tests for NBB.Core.Effects; Added unit tests for ProcessManager orchestration and Mediator integration; Added unit tests for ProjectR mediator integration; Added unit tests for Rusi messaging transport; Added unit tests for Serilog enrichers; Added unit tests for TenantIdHeaderMessagingTokenResolver; Added unit tests for TenantService; Added unit tests for configuration providers; Added unit tests for in-process messaging and storage; Added unit tests for messaging abstractions and data contracts; Added unit tests for messaging pipeline middleware; Added unit tests for messaging side-effect handlers; Added unit tests for multi-tenant configuration and context management; Added unit tests for multi-tenant messaging components; Added unit tests for tenant identification DI extensions; Added unit tests for the Messaging Host lifecycle and configuration; Added unit tests for the core pipeline middleware execution.
Dependencies
Samples upgraded to .NET 10 and Aspire 13.6
The sample projects (MicroServices, Monolith, and MultiTenancy) have been updated to target .NET 10.0. The AppHost projects now use Aspire 13.6.0, and the F\# Invoice sample uses Giraffe 8.2.0. Package references for Microsoft.Extensions.\*, EntityFrameworkCore, and Mediator are now managed via version variables (e.g., $(MicrosoftExtensionsPackagesVersion)) to align with the new framework version.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 38 → 45 (+6.6)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 52 → 52 (+0.0)
- Architecture 78 → 77 (-1.0)
- Maturity 36 → 65 (+29.0)
- Readiness 63 → 73 (+10.1)
- Security 23 → 23 (-0.5)
- Domain Modelling 97 → 97 (+0.0)
- Event-Driven 83 → 88 (+5.1)
- Event Sourcing 100 → 100 (+0.0)
- Performance 76 → 85 (+8.6)
Resolved (142)
- Concentrated knowledge decay
- Domain: 1 contract type(s) expose producer-owned ids/enums
- EventStore: 1 contract type(s) expose producer-owned ids/enums
- EventStoreDnIntegrationTests: 1 contract type(s) expose producer-owned ids/enums
- Low coverage: src/Core/NBB.Core.Abstractions/ConcurrencyException.cs (src/Core/NBB.Core.Abstractions/ConcurrencyException.cs)
- Low coverage: src/Core/NBB.Core.Abstractions/ConcurrencyUnrecoverableException.cs (src/Core/NBB.Core.Abstractions/ConcurrencyUnrecoverableException.cs)
- Most significant orphaned file (src/Core/NBB.Core.DependencyInjection/ServiceCollectionExtension.cs)
- NBB: 4 contract type(s) expose producer-owned ids/enums
- Off-boarding risk: anonymized user #1
- Orphaned file (src/Core/NBB.Core.Abstractions/ActivityExtensions.cs)
- Orphaned file (src/Core/NBB.Core.Abstractions/TypeExtensions.cs)
- Orphaned file (src/Core/NBB.Core.Configuration/DotEnvConfigurationExtensions.cs)
- Orphaned file (src/Core/NBB.Core.Configuration/DotEnvConfigurationProvider.cs)
- Orphaned file (src/Core/NBB.Core.DependencyInjection/ImplementationTypeFilter.cs)
- Orphaned file (src/Core/NBB.Core.DependencyInjection/ReflectionExtensions.cs)
- Orphaned file (src/Core/NBB.Core.Pipeline/PipelineBuilderExtensions.cs)
- Orphaned file (src/Data/NBB.Data.EntityFramework/EfReadOnlyRepository.cs)
- Orphaned file (src/Data/NBB.Data.EntityFramework/Internal/ExpressionBuilder.cs)
- Orphaned file (src/Data/NBB.Data.EventSourcing/EventSourcedRepository.cs)
- Orphaned file (src/Domain/NBB.Domain/Entity.cs)
- …and 122 more
New (20)
- Deprecated: NATS.Client (src/Messaging/NBB.Messaging.Nats/NBB.Messaging.Nats.csproj)
- Duplicated block (5 lines × 4) (samples/MicroServices/NBB.Contracts/NBB.Contracts.Migrations/Program.cs)
- Duplicated block (7 lines × 2) (src/Messaging/NBB.Messaging.MultiTenancy/TenantMiddleware.cs)
- Fixed-sleep synchronisation: Shoud_restart_even_if_stop_fails (test/UnitTests/Messaging/NBB.Messaging.Host.Tests/HostTests.cs)
- Fixed-sleep synchronisation: TestSubscriber (test/UnitTests/Messaging/NBB.Messaging.Rusi.Tests/SubscriberTests.cs)
- Medium: security finding (details withheld)
- Off-boarding risk: anonymized user #1
- Orphaned files with no living knowledge
- doc comments repeat the names (src/Core/NBB.Core.Abstractions/ActivityExtensions.cs)
- doc comments repeat the names (src/Core/NBB.Core.Configuration/DotEnvConfigurationExtensions.cs)
- doc comments repeat the names (src/Core/NBB.Core.DependencyInjection/ReflectionExtensions.cs)
- doc comments repeat the names (src/Core/NBB.Core.Pipeline/IPipelineBuilder.cs)
- doc comments repeat the names (src/Correlation/NBB.Correlation.Serilog.SqlServer/LoggerConfigurationExtensions.cs)
- doc comments repeat the names (src/Messaging/NBB.Messaging.Abstractions/IMessagingTransport.cs)
- doc comments repeat the names (src/Messaging/NBB.Messaging.Host/Builder/TypeSelector/ITypeSelector.cs)
- doc comments repeat the names (src/Messaging/NBB.Messaging.MediatR/MediatRMessagingHostExtensions.cs)
- doc comments repeat the names (src/Messaging/NBB.Messaging.Mediator/MediatorMessagingHostExtensions.cs)
- doc comments repeat the names (src/MultiTenancy/NBB.MultiTenancy.Abstractions/Configuration/TenantConfigurationExtensions.cs)
- doc comments repeat the names (src/MultiTenancy/NBB.MultiTenancy.Identification/Services/ITenantIdentificationService.cs)
- doc comments repeat the names (src/Orchestration/NBB.ProcessManager.Runtime/Timeouts/TimeoutBatch.cs)
Changes since last survey
- 2 commits — 2 feature/other, 0 fixes
By area
- src/Messaging — 2 commits
Notable commits
- change: Support non-durable JetStream subscriptions and per-subscriber fan-out (#299)
- change: Tag ASP.NET request activity with correlation and tenant ids (#300)
API surface
- Unchanged — 14 HTTP endpoints
Architecture
- Unchanged — 2 containers · 10 contexts · 17 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
osstotalsoft/nbb was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 8 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 2c77a6f215e26dd325dd9637ae0412f9103e32f7 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-45ab2cab63de.