Async/await first CQRS+ES and DDD framework for .NET
OTHER License
Bot releases are hidden (Show)
Published by rasmus almost 7 years ago
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. The ICommandBus.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 provided CommandHandler<,,>
base
class.
Breaking: Source IDs on commands have been reworked to "make room" for
execution results on commands. The generic parameter from ICommand<,,>
and ICommandHandler<,,,>
has been removed in favor of the new execution
results. ICommand.SourceId
is now of type ISourceId
instead of using
the generic type and the ICommandBus.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 this
var 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
Published by rasmus about 7 years ago
EventStore.Client
dependency to version 4.0EventFlow.EventStores.EventStore
toEventStore.Client
NuGet dependencyEventFlow.Hangfire
now depends on Hangfire.Core
instead ofHangfire
IDomainEventPublisher.PublishAsync
that isn'tIReadModelPopulator.DeleteAsync
that allows deletion of singleIDomainEventPublisher.PublishAsync<,>
(generic) in favor of thePublished by rasmus over 7 years ago
IReadModelPopulator
to extensionIReadModelPopulator
EventFlow.TestHelpers
which contains several test suites40501
(serverIMsSqlConfiguration.SetServerBusyRetryDelay(RetryDelay)
ISqlConfiguration.SetTransientRetryCount(int)
10928
, 10929
, 18401
and 40540
as wellWin32Exception
exceptions to the list treated as transientPublished by rasmus over 7 years ago
IEventFlowOpions.AddSynchronousSubscriber<,,,>
andIEventFlowOpions.AddAsynchronousSubscriber<,,,>
generic methodsIEventFlowOpions.AddSubscriber
, IEventFlowOpions.AddSubscribers
andIEventFlowOpions.AddDefaults
now correctly registers implementations ofISubscribeAsynchronousTo<,,>
IEventFlowOpions.AddSubscriber
is marked obsolete in favor of itsPublished by rasmus over 7 years ago
IEventFlowOpions.CreateResolver(true)
is invoked.Published by rasmus over 7 years ago
ISubscribeAsynchronousTo<,,>
wont get invokedeventFlowOptions.Configure(c => IsAsynchronousSubscribersEnabled = true);
the ITaskRunner
has been removed and asynchronous subscribers are nowITaskRunner
led to unexpected taskEventFlow.Hangfire
NuGet package. The defaultInstantJobScheduler
, which executes jobs synchronously,InstantJobScheduler
, the default in-memory scheduler if nothingInstantJobScheduler
behaves as any other out-of-processPublished by rasmus over 7 years ago
EventFlow
EventFlow.Autofac
EventFlow.Elasticsearch
EventFlow.Hangfire
EventFlow.RabbitMQ
Microsoft.Owin.Host.HttpListener
fromEventFlow.Owin
as it doesn't need itPublished by rasmus over 7 years ago
Published by rasmus over 7 years ago
IDomainEvent.Metadata.EventId
is now correctlyPublished by rasmus over 7 years ago
Enable source server support
to be able to step throughIDisposable.Dispose()
upon disposingPublished by rasmus over 7 years ago
Published by rasmus almost 8 years ago
EventFlow
core NuGet package.EventFlow.Autofac
and willCommand<,,>
now inherits from ValueObject
UseResolverAggregateRootFactory()
and UseAutofacAggregateRootFactory()
IEventFlowOptions.AddAggregateRoots(...)
overloads are obsolete,Published by rasmus almost 8 years ago
Published by rasmus almost 8 years ago
EventFlow.MsSql
package
EventFlow.EventStores.MsSql
EventFlow.ReadStores.MsSql
ITaskRunner.Run(...)
has changed signature. The task factory nowIResolver
that is valid for the duration of the taskISubscribeAsynchronousTo<,,>
is now valid forPublished by rasmus almost 8 years ago
ISubscribeAsynchronousTo<,,>
as an alternative to the existingISubscribeSynchronousTo<,,>
, which allow domain event subscribers to beITaskRunner
ITaskRunner
for which the default implementation is mere a thinTask.Run(...)
with some logging added. Implemting thisITaskRunner
in very limited cases, e.g. ifISubscribeAsynchronousTo<,,>
Published by rasmus about 8 years ago
IAggregateStore.UpdateAsync
and StoreAsync
now publishes committedIAggregateStore.UpdateAsync
Published by rasmus about 8 years ago
IMemoryCache
for which the default implementation is a thinMemoryCache
. EventFlow relies on extensive useUsePermanentMemoryCache()
extensionIEventFlowOptions
to have EventFlow use the previous cacheConcurrentDictionary<,,>
based in-memory cacheIdentity<>.With(Guid)
which allows identities to be createdGuid
Identity<>.GetGuid()
which returns the internal Guid
Published by rasmus about 8 years ago
v0.32.2163
by adding NuGet package referenceDbUp
to EventFlow.Sql
. The package was previously ILMerged.Published by rasmus over 8 years ago
EventFlow.Elasticsearch
eventflow-[lower case type name]
,eventflow-thingyreadmodel
, instead of merely eventflow
Elasticsearch.Net
v2.3.3 (up from v1.7.1)Elasticsearch.Net.JsonNET
removedNEST
v2.3.3 (up from v1.7.1)Newtonsoft.Json
v8.0.3 (up from v7.0.1)IEventStore
ICommandBus
Published by rasmus over 8 years ago
options.Configure(c => c.ThrowSubscriberExceptions = true)
ICommandScheduler
for easy scheduling of commands