event-store

Handling out of order events in CQRS read side

拈花ヽ惹草 提交于 2019-11-30 02:51:49
问题 I've read this nice post from Jonathan Oliver about handling out of order events. http://blog.jonathanoliver.com/cqrs-out-of-sequence-messages-and-read-models/ The solution that we use is to dequeue a message and to place it in a “holding table” until all messages with a previous sequence are received. When all previous messages have been received we take all messages out of the holding table and run them in sequence through the appropriate handlers. Once all handlers have been executed

Unknown discriminator value 'MyEvent'

心不动则不痛 提交于 2019-11-29 13:51:19
Using the MongoDB persistance engine in joliver/EventStore causing the error Unknown discriminator value 'MyEvent' . The issue is only caused when I try to load all events for replaying the events like this.storeEvent.Advanced.GetFrom(new DateTime(2010, 1,1)) The issues is caused in ExtensionsMethods.cs public class MyClassEvent : IDomainEvent { ... } public static Commit ToCommit(this BsonDocument doc, IDocumentSerializer serializer) { if (doc == null) return null; var id = doc["_id"].AsBsonDocument; var streamId = id["StreamId"].AsGuid; var commitSequence = id["CommitSequence"].AsInt32; var

CQRS: Storing events and publishing them - how do I do this in a safe way?

僤鯓⒐⒋嵵緔 提交于 2019-11-28 16:52:54
As I've learned in Why is the CQRS repository publishing events, not the event store? it's the CQRS repository's task to publish events. So far, so good. Of course, storing the events and publishing them should be within one single transaction. Technically this means writing one (or more) records to the store, and publishing one (or more) events to a message bus. Hence, a simple database transaction is not enough, it should be a distributed one. Now, unfortunately, many NoSQL databases (such as MongoDB) do not support ACID-compliant transactions, not even to talk of the possibility of taking

CQRS: Storing events and publishing them - how do I do this in a safe way?

寵の児 提交于 2019-11-27 10:01:20
问题 As I've learned in Why is the CQRS repository publishing events, not the event store? it's the CQRS repository's task to publish events. So far, so good. Of course, storing the events and publishing them should be within one single transaction. Technically this means writing one (or more) records to the store, and publishing one (or more) events to a message bus. Hence, a simple database transaction is not enough, it should be a distributed one. Now, unfortunately, many NoSQL databases (such