Releases: eventflow/EventFlow
v0.52.3178
- Fixed:
.UseFilesEventStore
now uses a thread safe singleton instance for
file system persistence, making it suitable for use in multi-threaded unit
tests. Please don't use the files event store in production scenarios - New: Support for unicode characters in type names. This simplifies using an
ubiquitous language
in non-english domains - Fixed: Include hyphen in prefix validation for identity values. This fixes a bug
where invalid identities could be created (e.g.ThingyId.With("thingyINVALID-a41e...")
)
v0.51.3155
- New: Removed the
new()
requirement for read models - New: If
ISagaLocator.LocateSagaAsync
cannot identify the saga for a given
event, it may now returnTask.FromResult(null)
in order to short-circuit
the dispatching process. This might be useful in cases where some instances
of an event belong to a saga process while others don't - Fixed:
StringExtensions.ToSha256()
can now be safely used from
concurrent threads.
v0.50.3124
-
New: While EventFlow tries to limit the about of painful API changes, the
introduction of execution/command results are considered a necessary step
towards as better API.Commands and command handlers have been updated to support execution
results. Execution results is meant to be an alternative to throwing domain
exceptions to do application flow. In short, before you were required to
throw an exception if you wanted to abort execution and "return" a failure
message.The introduction of execution results changes this, as it allows
returning a failed result that is passed all the way back to the command
publisher. Execution results are generic and can thus contain e.g. any
validation results that a UI might need. TheICommandBus.PublishAsync
signature has changed to reflect this.from
Task<ISourceId> PublishAsync<TAggregate, TIdentity, TSourceIdentity>( ICommand<TAggregate, TIdentity, TSourceIdentity> command) where TAggregate : IAggregateRoot<TIdentity> where TIdentity : IIdentity where TSourceIdentity : ISourceId
to
Task<TExecutionResult> PublishAsync<TAggregate, TIdentity, TExecutionResult>( ICommand<TAggregate, TIdentity, TExecutionResult> command, CancellationToken cancellationToken) where TAggregate : IAggregateRoot<TIdentity> where TIdentity : IIdentity where TExecutionResult : IExecutionResult
Command handler signature has changed from
Task ExecuteAsync( TAggregate aggregate, TCommand command, CancellationToken cancellationToken);
to
Task<TExecutionResult> ExecuteCommandAsync( TAggregate aggregate, TCommand command, CancellationToken cancellationToken)
Migrating to the new structure should be seamless if your current code base
inherits its command handlers from the providedCommandHandler<,,>
base
class. -
Breaking: Source IDs on commands have been reworked to "make room" for
execution results on commands. The generic parameter fromICommand<,,>
andICommandHandler<,,,>
has been removed in favor of the new execution
results.ICommand.SourceId
is now of typeISourceId
instead of using
the generic type and theICommandBus.PublishAsync
no longer returns
Task<ISourceId>
To get code that behaves similar to the previous version, simply take the
ISourceId
from the command, i.e., instead of thisvar sourceId = await commandBus.PublishAsync(command);
write this
await commandBus.PublishAsync(command); var sourceId = command.SourceId;
(
CancellationToken
and.ConfigureAwait(false)
omitted fromt he above) -
Breaking: Upgraded NuGet dependency on
RabbitMQ.Client
from>= 4.1.3
to>= 5.0.1
v0.49.3031
- Breaking: Upgraded
EventStore.Client
dependency to version 4.0 - Breaking: Changed target framework for
EventFlow.EventStores.EventStore
to
.NET 4.6.2 as required byEventStore.Client
NuGet dependency - Fix:
EventFlow.Hangfire
now depends onHangfire.Core
instead of
Hangfire
- New: Added an overload to
IDomainEventPublisher.PublishAsync
that isn't
generic and doesn't require an aggregate ID - New: Added
IReadModelPopulator.DeleteAsync
that allows deletion of single
read models - Obsolete:
IDomainEventPublisher.PublishAsync<,>
(generic) in favor of the
new less restrictive non-generic overload
v0.48.2937
- Breaking: Moved non-async methods on
IReadModelPopulator
to extension
methods - New: Added non-generic overloads for purge and populate methods on
IReadModelPopulator
- New: Provided
EventFlow.TestHelpers
which contains several test suites
that is useful when developing event and read model stores for EventFlow.
The package is an initial release and its interface is unstable and
subject to change - New: Now possible to configure retry delay for MSSQL error
40501
(server
too busy) usingIMsSqlConfiguration.SetServerBusyRetryDelay(RetryDelay)
- New: Now possible to configure the retry count of transient exceptions for
MSSQL and SQLite using theISqlConfiguration.SetTransientRetryCount(int)
- Fixed: Added MSSQL error codes
10928
,10929
,18401
and40540
as well
as a few nativeWin32Exception
exceptions to the list treated as transient
errors, i.e., EventFlow will automatically retry if the server returns one
of these
v0.47.2894
- New: To be more explicit,
IEventFlowOpions.AddSynchronousSubscriber<,,,>
and
IEventFlowOpions.AddAsynchronousSubscriber<,,,>
generic methods - Fix:
IEventFlowOpions.AddSubscriber
,IEventFlowOpions.AddSubscribers
and
IEventFlowOpions.AddDefaults
now correctly registers implementations of
ISubscribeAsynchronousTo<,,>
- Obsolete:
IEventFlowOpions.AddSubscriber
is marked obsolete in favor of its
explicite counterparts
v0.46.2886
- Fix: EventFlow now uses a Autofac lifetime scope for validating service
registrations whenIEventFlowOpions.CreateResolver(true)
is invoked.
Previously services were created but never disposed as they were resolved
using the root container
v0.45.2877
- Breaking: Asynchronous subscribers are now disabled by default, i.e.,
any implementations ofISubscribeAsynchronousTo<,,>
wont get invoked
unless enabledtheeventFlowOptions.Configure(c => IsAsynchronousSubscribersEnabled = true);
ITaskRunner
has been removed and asynchronous subscribers are now
invoked using a new scheduled job that's scheduled to run right after the
domain events are emitted. Using theITaskRunner
led to unexpected task
terminations, especially if EventFlow was hosted in IIS. If enabling
asynchronous subscribers, please make sure to configure proper job
scheduling, e.g. by using theEventFlow.Hangfire
NuGet package. The default
job scheduler isInstantJobScheduler
, which executes jobs synchronously,
giving a end result similar to that of synchronous subscribers - Breaking:
InstantJobScheduler
, the default in-memory scheduler if nothing
is configured, now swallows all job exceptions and logs them as errors. This
ensure that theInstantJobScheduler
behaves as any other out-of-process
job scheduler
v0.44.2832
- New: .NET Standard 1.6 support for the following NuGet packages
EventFlow
EventFlow.Autofac
EventFlow.Elasticsearch
EventFlow.Hangfire
EventFlow.RabbitMQ
- Fixed: Removed dependency
Microsoft.Owin.Host.HttpListener
from
EventFlow.Owin
as it doesn't need it
v0.43.2806
- Breaking: Updated all NuGet package dependencies to their latest versions
- New: EventFlow now embeds PDB and source code within the assemblies using
SourceLink (GitLink now removed)