|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +## v4.2.0 |
| 6 | + |
| 7 | +### Added |
| 8 | + |
| 9 | +- **Event Contextual Data:** Added the `Items` property back to `EventMediationSettings`, allowing contextual data to be |
| 10 | + passed through the event mediation pipeline, similar to commands and queries. |
| 11 | + |
| 12 | +### Improved |
| 13 | + |
| 14 | +- **.NET 10 Support:** Added support for .NET 10 across all relevant projects. |
| 15 | +- **Developer Experience:** Made assembly signing conditional on the existence of the `LiteBus.snk` file. This |
| 16 | + simplifies the build process for contributors who fork the repository, as they no longer need to generate a strong |
| 17 | + name key to build the project locally. |
| 18 | + |
3 | 19 | ## v4.1.0 |
4 | 20 |
|
5 | 21 | ### Added |
6 | 22 |
|
7 | | -- **Type-Safe Stream Query Post-Handler:** Introduced the new `IStreamQueryPostHandler<TQuery, TQueryResult>` interface. This provides a strongly-typed post-handler for stream queries, giving access to the original query and the `IAsyncEnumerable<TQueryResult>` result stream, aligning its design with regular command and query post-handlers. |
| 23 | +- **Type-Safe Stream Query Post-Handler:** Introduced the new `IStreamQueryPostHandler<TQuery, TQueryResult>` interface. |
| 24 | + This provides a strongly-typed post-handler for stream queries, giving access to the original query and the |
| 25 | + `IAsyncEnumerable<TQueryResult>` result stream, aligning its design with regular command and query post-handlers. |
8 | 26 |
|
9 | 27 | ### Fixed |
10 | 28 |
|
11 | | -- **Stream Query Context Preservation:** Fixed a critical bug in the stream query mediation strategy where the `AmbientExecutionContext` was lost during stream enumeration. This prevented stream handlers from accessing the context (e.g., `Items` collection) in logic that executed after yielding all results, and also prevented stream post-handlers from accessing the context. The context is now correctly preserved throughout the entire streaming lifecycle. |
| 29 | +- **Stream Query Context Preservation:** Fixed a critical bug in the stream query mediation strategy where the |
| 30 | + `AmbientExecutionContext` was lost during stream enumeration. This prevented stream handlers from accessing the |
| 31 | + context (e.g., `Items` collection) in logic that executed after yielding all results, and also prevented stream |
| 32 | + post-handlers from accessing the context. The context is now correctly preserved throughout the entire streaming |
| 33 | + lifecycle. |
12 | 34 |
|
13 | 35 | ## v4.0.0 |
14 | 36 |
|
15 | | -This is a major release with a fundamental architectural redesign to decouple the library from specific Dependency Injection (DI) containers, introduce a durable Command Inbox, and provide advanced control over event mediation. |
| 37 | +This is a major release with a fundamental architectural redesign to decouple the library from specific Dependency |
| 38 | +Injection (DI) containers, introduce a durable Command Inbox, and provide advanced control over event mediation. |
16 | 39 |
|
17 | 40 | ### 🚀 Features |
18 | 41 |
|
19 | | -- **Dependency Injection Abstraction (`LiteBus.Runtime`):** The entire library has been refactored to be DI-agnostic, introducing a new runtime layer. This decouples the core logic from any specific DI container and allows for integrations via a lightweight adapter pattern. |
20 | | -- **Autofac Support:** Added first-class integration with Autofac via the new `LiteBus.Extensions.Autofac` package and its companions. |
21 | | -- **Durable Command Inbox:** Introduced a new Command Inbox feature for guaranteed, durable, and deferred command execution. Commands can be marked with `[StoreInInbox]` to be persisted and processed by a background service (`CommandInboxProcessorHostedService`). |
22 | | -- **Advanced Event Mediation:** Overhauled event mediation with powerful new controls: |
23 | | - - The new `[HandlerPriority]` attribute replaces `[HandlerOrder]` for defining execution priority. |
24 | | - - Added configurable concurrency for both priority groups (`PriorityGroupsConcurrencyMode`) and handlers within the same group (`HandlersWithinSamePriorityConcurrencyMode`). |
25 | | - - Enhanced `HandlerPredicate` that receives a full `IHandlerDescriptor` for advanced filtering logic based on handler type, priority, tags, and message type. |
| 42 | +- **Dependency Injection Abstraction (`LiteBus.Runtime`):** The entire library has been refactored to be DI-agnostic, |
| 43 | + introducing a new runtime layer. This decouples the core logic from any specific DI container and allows for |
| 44 | + integrations via a lightweight adapter pattern. |
| 45 | +- **Autofac Support:** Added first-class integration with Autofac via the new `LiteBus.Extensions.Autofac` package and |
| 46 | + its companions. |
| 47 | +- **Durable Command Inbox:** Introduced a new Command Inbox feature for guaranteed, durable, and deferred command |
| 48 | + execution. Commands can be marked with `[StoreInInbox]` to be persisted and processed by a background service ( |
| 49 | + `CommandInboxProcessorHostedService`). |
| 50 | +- **Advanced Event Mediation:** Overhauled event mediation with powerful new controls: |
| 51 | +- The new `[HandlerPriority]` attribute replaces `[HandlerOrder]` for defining execution priority. |
| 52 | +- Added configurable concurrency for both priority groups (`PriorityGroupsConcurrencyMode`) and handlers within the same |
| 53 | + group (`HandlersWithinSamePriorityConcurrencyMode`). |
| 54 | +- Enhanced `HandlerPredicate` that receives a full `IHandlerDescriptor` for advanced filtering logic based on handler |
| 55 | + type, priority, tags, and message type. |
26 | 56 |
|
27 | 57 | ### ✨ Improvements |
28 | 58 |
|
29 | | -- **Simplified Module Registration:** The `AddCommandModule`, `AddEventModule`, and `AddQueryModule` extensions now automatically register the core `MessageModule`, reducing boilerplate configuration. |
30 | | -- **Robust Message Registry:** The internal `MessageRegistry` has been re-engineered for improved performance and correctness, ensuring handlers are correctly associated with messages regardless of registration order. |
31 | | -- **API Clarity:** Renamed several properties for better intent, such as `Order` to `Priority` on descriptors and `Handlers` to `MainHandlers` on `IMessageDependencies`. |
32 | | -- **Testability:** Added `IMessageRegistry.Clear()` to allow resetting the registry state, which is useful in test environments. |
| 59 | +- **Simplified Module Registration:** The `AddCommandModule`, `AddEventModule`, and `AddQueryModule` extensions now |
| 60 | + automatically register the core `MessageModule`, reducing boilerplate configuration. |
| 61 | +- **Robust Message Registry:** The internal `MessageRegistry` has been re-engineered for improved performance and |
| 62 | + correctness, ensuring handlers are correctly associated with messages regardless of registration order. |
| 63 | +- **API Clarity:** Renamed several properties for better intent, such as `Order` to `Priority` on descriptors and |
| 64 | + `Handlers` to `MainHandlers` on `IMessageDependencies`. |
| 65 | +- **Testability:** Added `IMessageRegistry.Clear()` to allow resetting the registry state, which is useful in test |
| 66 | + environments. |
33 | 67 |
|
34 | 68 | ### 💥 Breaking Changes |
35 | 69 |
|
36 | | -- **Project Structure & NuGet Packages:** The project structure and package names have been completely refactored. You must update your `.csproj` files to reference the new packages (e.g., `LiteBus.Extensions.Microsoft.DependencyInjection`, `LiteBus.Commands.Extensions.Microsoft.DependencyInjection`). |
37 | | -- **DI Registration API:** The `AddLiteBus` registration process is now part of the new DI-specific extension packages. Module registration extensions (`AddCommandModule`, etc.) have moved to their respective core namespaces (e.g., `LiteBus.Commands`). |
38 | | -- **Attribute Renaming:** `[HandlerOrder]` has been replaced by `[HandlerPriority]`. The `Order` property on `IHandlerDescriptor` is now `Priority`. |
39 | | -- **Mediation Settings `Items` Key:** The key type for the `Items` dictionary on `CommandMediationSettings`, `QueryMediationSettings`, and `ExecutionContext` has been changed from `object` to `string`. |
40 | | -- **`EventMediationSettings` Redesign:** The structure of `EventMediationSettings` has been completely changed to support the new priority and concurrency features. The `Filters` property is now `Routing`, and a new `Execution` property has been added. |
41 | | -- **`IMessageDependencies` Renaming:** The `Handlers` and `IndirectHandlers` properties have been renamed to `MainHandlers` and `IndirectMainHandlers`, respectively. This affects custom mediation strategies. |
42 | | - |
43 | | -> **Note:** Due to the significant architectural changes, please refer to the **v4 Migration Guide** in the release notes for detailed instructions on upgrading your project. |
44 | | -
|
| 70 | +- **Project Structure & NuGet Packages:** The project structure and package names have been completely refactored. You |
| 71 | + must update your `.csproj` files to reference the new packages (e.g., |
| 72 | + `LiteBus.Extensions.Microsoft.DependencyInjection`, `LiteBus.Commands.Extensions.Microsoft.DependencyInjection`). |
| 73 | +- **DI Registration API:** The `AddLiteBus` registration process is now part of the new DI-specific extension packages. |
| 74 | + Module registration extensions (`AddCommandModule`, etc.) have moved to their respective core namespaces (e.g., |
| 75 | + `LiteBus.Commands`). |
| 76 | +- **Attribute Renaming:** `[HandlerOrder]` has been replaced by `[HandlerPriority]`. The `Order` property on |
| 77 | + `IHandlerDescriptor` is now `Priority`. |
| 78 | +- **Mediation Settings `Items` Key:** The key type for the `Items` dictionary on `CommandMediationSettings`, |
| 79 | + `QueryMediationSettings`, and `ExecutionContext` has been changed from `object` to `string`. |
| 80 | +- **`EventMediationSettings` Redesign:** The structure of `EventMediationSettings` has been completely changed to |
| 81 | + support the new priority and concurrency features. The `Filters` property is now `Routing`, and a new `Execution` |
| 82 | + property has been added. |
| 83 | +- **`IMessageDependencies` Renaming:** The `Handlers` and `IndirectHandlers` properties have been renamed to |
| 84 | + `MainHandlers` and `IndirectMainHandlers`, respectively. This affects custom mediation strategies. |
| 85 | + |
| 86 | +> **Note:** Due to the significant architectural changes, please refer to the **v4 Migration Guide** in the release |
| 87 | +> notes for detailed instructions on upgrading your project. |
45 | 88 |
|
46 | 89 | ## v3.1.0 |
47 | 90 |
|
|
0 commit comments