Awesome Open Source
Awesome Open Source


Hits GitHub issues Build Status PRs Welcome

DDD+CQRS+Event-sourcing examples using EventFlow following CQRS-ES architecture. It is configured with RabbitMQ, MongoDB(Snapshot store), PostgreSQL(Read store), EventStore(GES). It's targeted to .Net Core 2.2 and include docker compose file.

Event Sourcing/CQRS Architecture

The most common CQRS/ES architecture would look like following diagram OverallArchitecture

The example consists of the following concepts, each shown below

  • Aggregates
  • Command bus and commands
  • Synchronous subscriber
  • Event store (GES)
  • In-memory read model.
  • Snapshots (MongoDb)
  • Sagas
  • Event publising (In-memory, RabbitMq)
  • Metadata
  • Command bus decorator, custom value object, custom execution result, ...


var resolver = EventFlowOptions.New
    .UseAutofacContainerBuilder(new ContainerBuilder())
    .Configure(c => c.ThrowSubscriberExceptions = true)
    .ConfigureMongoDb(client, SNAPSHOT_CONTAINER_NAME)
    .RegisterServices(sr => sr.Register(i => SnapshotEveryFewVersionsStrategy.Default))
    .PublishToRabbitMq(RabbitMqConfiguration.With(new Uri(@"amqp://test:[email protected]:5672"), true, 4, "eventflow"))

📦 Stack

🤝 Contributing

  1. Fork it ( )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

✨ Contributors

GitHub Contributors Image

Show your support

Please ⭐️ this repository if this project helped you!

📝 License

Apache-2.0 © Oktay Kır

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
c-sharp (11,742
mongodb (772
dotnet-core (386
rabbitmq (243
dotnetcore (176
ddd (168
cqrs (156
event-sourcing (131
event-driven (88
domain-driven-design (88
eventsourcing (35
eventstore (34
sagas (19
eventsource (15

Find Open Source By Browsing 7,000 Topics Across 59 Categories