event-sourcing

Why is my command event string field being retrieved as null

泄露秘密 提交于 2019-12-11 07:26:58
问题 I am writing my first EventStore test app, I am re-hydrating my object from a stream, and whilst it gets the numberSold correctly, the title is null, and I don't understand why - the command when retrieved from the stream has the title set as null but I am sure it is being written OK. Can a fresh pair of eyes see what I am doing wrong? private static void Main() { using (store = WireupEventStore()) { var newBook = new Book("my book", 0); newBook.ChangeBookName("renamed book"); newBook

Why does the RetryScheduler in Axon Framework not retry after a NoHandlerForCommandException?

我们两清 提交于 2019-12-11 05:03:53
问题 so I have a Saga and the Saga sends a command to a different microservice on a specific event. I wanted to configure the commandGateway with a RetryScheduler, so that it retries to send the command in case that the other microservice is down. The RetryScheduler will only perform retries if the exception is a RuntimeException, which the NoHandlerForCommandException that is thrown when the other service if offline definately is. If i dont set the maxRetryCount then the error message is o.a.c

Mass Transit: ensure message processing order when there are different message types

我们两清 提交于 2019-12-11 02:22:20
问题 I'm new to Mass Transit and I would like to understand if it can helps with my scenario. I'm building a sample application implemented with a CQRS event sourcing architecture and I need a service bus in order to dispatch the events created by the command stack to the query stack denormalizers. Let's suppose of having a single aggregate in our domain, let's call it Photo , and two different domain events: PhotoUploaded and PhotoArchived . Given this scenario, we have two different message

Laravel Event Sourcing (Spatie) - Using projections within business rules

萝らか妹 提交于 2019-12-10 12:04:21
问题 I know that the general concept behind event sourcing is that the state of the application should be able to be replayed from the event stream. Sometimes, however, we need to get information for business rules from other parts of the system. i.e. An account has a user. A user has a blacklist status which is required to check if they can access/edit the account. In the below example (purely for demonstration purposes), a user tries to subtract $10 from their account. If a user has been

Event Sourcing and SQL Server multiple relational tables

时光总嘲笑我的痴心妄想 提交于 2019-12-10 03:45:27
问题 We use event sourcing with SQL Server 2016. We have total Customer Product Application, each is labelled by CustomerId and gets a single Guide line item in the event store. This is the primary identifier for write event store guids. The Product Applications comes with many different relational things, (which do not have guids but natural keys) each customer has Multiple Addresses, Accounts, Multiple purchase orders. The write event store will be mapped to a relational database tables any way

EventSourced Saga Implementation

孤街醉人 提交于 2019-12-09 12:57:52
问题 I have written an Event Sourced Aggregate and now implemented an Event Sourced Saga... I have noticed the two are similair and created an event sourced object as a base class from which both derive. I have seen one demo here http://blog.jonathanoliver.com/cqrs-sagas-with-event-sourcing-part-ii-of-ii/ but feel there may be an issue as Commands could be lost in the event of a process crash as the sending of commands is outside the write transaction? public void Save(ISaga saga) { var events =

EventStore + RavenDB, not deserializing correct

家住魔仙堡 提交于 2019-12-08 04:16:32
问题 Trying out JOliver CommonDoman/EventStore 3.0 with RavenDB, where it works fine to store events, but when trying to load an aggregate root with IRepository.GetById() there is an issue in deserialization. Giving the error message "Unable to cast object of type 'Raven.Abstractions.Linq.DynamicList' to type 'System.Collections.Generic.List`1[EventStore.EventMessage]'." at DocumentObjectSerializer.cs, public T Deserialize<T>(object document) { Logger.Verbose(Messages.DeserializingStream, typeof(T

Occasionally connected CQRS systems - Client and Server Commands - Task based screens

杀马特。学长 韩版系。学妹 提交于 2019-12-07 20:01:33
问题 Premise: It is recommended that in CQRS+DDD+ES style applications use task based screens, these screens guide the user and capture intent. These task screens can also be referred to as Inductive User Interface . Some examples of UI design guidelines that can help you create mondern, user-friendly apps: Microsoft Inductive User Interface Guidelines and, Index of UX guidelines The way I understand it, the tasks , generally speaking, should line up with Commands or Functions waiting on the

Reporting in the CQRS/ES world

巧了我就是萌 提交于 2019-12-07 18:32:27
问题 I think I understand the idea of the read model in the context of ES + CQRS (please correct me if not). However, I still have a few doubts about using it in the context of ‘serious’ reporting. Let us say I use a relational db plus some ORM to crud my read models. One basic ‘summary stats read model’ could look like this: class SummaryStats1 { public Guid TypeId { get; set; } public string TypeName { get; set; } public Guid SubTypeId { get; set; } public string SubTypeName { get; set; } public

Should an API Gateway Communicate via a Queue or directly to other μServices?

点点圈 提交于 2019-12-07 17:56:54
问题 I was wondering which of my two methods is more appropriate, or is there event another one? (1) Direct Direct communication between GATEWAY and μSERVICE A UI sends HTTP request to GATEWAY GATEWAY sends HTTP request to μSERVICE A μSERVICE A returns either SUCCESS or ERROR Event is stored in EVENT STORE and published to QUEUE PROJECTION DATABASE is updated Other μSERVICES might consume event (2) Events Event-based communication via a message queue UI sends HTTP request to GATEWAY GATEWAY