- Breaking: To support .NET going forward, all EventFlow test have been converted
from .NET Framework 4.x to .NET Core 3.1. This however, introduced a set of
breaking changes- EntityFramework has been updated from 2.2.6 to 3.1.5
IHangfireJobRunner.Executeis nowIHangfireJobRunner.ExecuteAsync
- Breaking: Merged
AggregateReadStoreManagerandSingleAggregateReadStoreManager
into one class in order to always guarantee in-order event processing - Breaking: Marked the
UseReadStoreFor<,,,>configuration methods as obsolete,
in favor of the simpler overloads with less type parameters (as those automatically
figure out the AggregateRoot and Id types and configure the more reliable
SingleAggregateReadStoreManagerimplementation) - Obsolete: The class
AsyncHelperand all non-async methods using it have been
marked obsolete and will be removed in EventFlow 1.0 (not planned yet). If you rely
on these non-async methods, then merely copy-paste theAsyncHelperfrom the EventFlow
code base and continue using it in your transition to async only - Fixed: An issue where
EntityFrameworkEventPersistencecould possibly save aggregate
events out of order, which would lead to out-of-order application when streaming events
ordered by GlobalSequenceNumber - New:
FilesEventPersistencenow uses relative paths - New: A new set of hook-in interfaces are provided from this release, which should
make it easier to implement crash resilience (#439) in EventFlow. Please note that
this new API is experimentational and subject to change as different strategies are
implementedIAggregateStoreResilienceStrategyIDispatchToReadStoresResilienceStrategyIDispatchToSubscriberResilienceStrategyISagaUpdateResilienceStrategy
Assets
34
- New: Added .NET Core 3.1 target for the
EventFlow
andEventFlow.EntityFrameworkpackages - Added quoting to the SQL query generator for the column names
Assets
34
- New: Updated LibLog provider to support structured logging with NLog 4.5.
Reduced memory allocations for log4net-provider - New: Made several methods in
AggregateRoot<,>virtualto allow
easier customization - Fixed: Added quoting to the SQL query generator for the column names
-- query before the fix
UPDATE [ReadModel-TestAttributes]
SET UpdatedTime = @UpdatedTime
WHERE Id = @Id
-- query after the fix
UPDATE [ReadModel-TestAttributes]
SET [UpdatedTime] = @UpdatedTime
WHERE [Id] = @Id- Fixed: Do not log about event upgraders if none is found for an event
- Fixed: Add default
nullpredicate toAddCommandsandAddJobs
Assets
34
- New: The
EventFlow.AspNetCoreNuGet package now has ASP.NET Core 3 support
Assets
34
- New: Mongo DB read model store Queryable:
MongoDbReadModelStore readModelStore; IQueryable<TReadModel> queryable = readModelStore.AsQueryable();
- New: Moved publish of messages in
RabbitMqPublisherto a new virtual
method to ease reuse and customization - Fixed: MongoDB read models no longer has the
new()generic requirement,
which aligns read model requirements with the rest of EventFlow
Assets
34
- Fix: When deserializing the JSON value
"null"into a struct value like
int, theSingleValueObjectConverterthrew an exception instead of
merely returningnullrepresenting an absentSingleValueObject<int>value
Assets
34
- Breaking: Renamed
AspNetCoreEventFlowOptions.AddMetadataProviders()
toAddDefaultMetadataProviders()and madeAddUserClaimsMetadataopt-in
in order to prevent policy issues. - Fix: Allow explicit implementations of
IEmit<>in aggregate roots - Fix: Using
.AddAspNetCore()with defaults now doesn't throw a DI
exception.
Assets
34
- New: Configure JSON serialization:
EventFlowOptions.New. .ConfigureJson(json => json .AddSingleValueObjects() .AddConverter<SomeConverter>() )
- New: ASP.NET Core enhancements:
- New fluent configuration API for ASP.NET Core components:
services.AddEventFlow(o => o.AddAspNetCore(c => {...}));(old syntax
AddAspNetCoreMetadataProvidersis now deprecated). .RunBootstrapperOnHostStartup()runs bootstrappers together with ASP.NET
host startup. Previously, this was done inAddAspNetCoreMetadataProviders
and led to some confusion..UseMvcJsonOptions()adds EventFlow JSON configuration (see below) to ASP.NET Core,
so you can accept and return Single Value Objects as plain strings for example..Add{Whatever}Metadata()configures specific metadata provider..AddUserClaimsMetadata(params string claimTypes)configures the new claims metadata
provider (for auditing or "ChangedBy" in read models)..UseLogging()configures an adapter for Microsoft.Extensions.Logging.UseModelBinding()adds model binding support for Single Value Objects:[HttpGet("customers/{id}")] public async Task<IActionResult> SingleValue(CustomerId id) { if (!ModelState.IsValid) { return BadRequest(ModelState); }
- New fluent configuration API for ASP.NET Core components:
- Fix: ASP.NET Core
AddRequestHeadersMetadataProviderdoesn't throw when
HttpContext is null. - Fix:
ReadModelRepopulatornow correctly populatesIAmAsyncReadModelFor
Assets
34
- New:
EventFlow.TestHelpersare now released as .NET Standard as well - Fix: Upgrade
EventStore.Clientto v5.0.1 and use it for both .NET Framework and .NET Core - Fix: Storing events in MS SQL Server using
MsSqlEventPersistencenow correctly
handles non-ANSI unicode characters in strings. - Fix: Source link integration now works correctly
Assets
34
- Breaking: Commands published from AggregateSaga which return
false
inIExecutionResult.IsSuccesswill newly lead to an exception being thrown.
For disabling all new changes just set protected property
AggregateSaga.ThrowExceptionsOnFailedPublishtofalsein your AggregateSaga constructor.
Also an Exception thrown from any command won't prevent other commands from being executed.
All exceptions will be collected and then re-thrown in SagaPublishException (even in case
of just one Exception). The exception structure is following:- SagaPublishException : AggregateException
- .InnerExceptions
- CommandException : Exception
- .CommandType
- .SourceId
- .InnerException # in case of an exception thrown from the command
- CommandException : Exception
- .CommandType
- .SourceId
- .ExecutionResult # in case of returned
falseinIExecutionResult.IsSuccess
You need to update yourISagaErrorHandlerimplementation to reflect new exception structure,
unless you disable this new feature.
- CommandException : Exception
- .InnerExceptions
- SagaPublishException : AggregateException
- Fix: MongoDB read store no longer throws an exception on non-existing read models (#625)