Questions tagged [event-sourcing]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
102 views

Primitive obsession, value objects, Commands, Events and where to convert

I tried to combine two rules. Don't fall to primitive obsession (e.g. EMailAddress should be a value object in domain objects and not a string). Don't use value objects in commands and events.1, 2, 3 ...
-1
votes
0answers
29 views

Validity of using Event Sourcing only on Invoicing system

To set some context, we have a telco system that contains multiple parts. Lets say we have Subscription, SMS Messaging, Voice Messaging, Charging, User, and Invoicing. Each of this have their own data ...
-3
votes
1answer
86 views

How to get Address pincode inside Customer class

I have 2 domains Customer and Address using using EventSourcing and CQRS in our Monolithic app, below is my query: Customer Domain: class Customer { //Aggregate class String custId; ...
1
vote
1answer
56 views

designing events for an event sourcing based application

In an application to handle employee leaves, I decided to try CQRS & event sourcing and came up with the following flow of events. app events leave-application-received leave-application-...
2
votes
3answers
154 views

Event Sourcing - Multiple events or a single for a change on one aggregate?

I have a checklist system where we are implementing CQRS/ ES (Event Sourcing). We have a command updateStatus(taskId: string, status: boolean) to mark a task or sub task as completed. If I receive a ...
0
votes
1answer
47 views

Event sourcing: Update local data before posting an event?

We are introducing events to our system (I would hesitate to call it 'event sourcing', but we have started down this road). To do this we are still maintaining the same HTTP public 'CRUD' API's, but ...
2
votes
1answer
127 views

Event Sourcing/CQRS for Self-Related Entities

I'm building a platform that has an entity named content. There's a clear boundary around what defines content except that it can have relationships with other content entities. Up until now, there's ...
1
vote
1answer
72 views

Options for building initial event sourcing projection when you cannot go back to the beginning of the history

I’m building a microservice which depends on a set of downstream services to collect the data necessary to operate. It is a data delivery system, I’m not source of truth for any data, my system rather ...
2
votes
3answers
206 views

What are the problems with command handlers returning data in CQRS?

I have a system using CQRS/ES, where: The command handlers are actually implemented as an application service layer, which executes synchronously. I.e. events are persisted in the event store before ...
1
vote
1answer
73 views

DDD - Concurrency and Command retrying with side-effects

I am developing an event-sourced Electric Vehicle Charging Station Management System, which is connected to several Charging Stations. In this domain, I've come up with an aggregate for the Charging ...
-1
votes
2answers
78 views

Merging aggregates with Event sourcing

I'm currently evaluating Event Sourcing and CQRS for an implementation of a new business requirement at my day job. While I can't really speak about the actual business problem, I can give a few ...
-2
votes
2answers
52 views

Event Sourcing Architecture: Ingesting event data from Phones

We will be streaming data from Phones (<= 5000) to a server. We were previously sending the data using MQTT to AWS IOT. Now we want to run this locally. Estimated size per second to be ingested is ...
-2
votes
3answers
186 views

How does “event triggers event” really work in Event Sourcing / CQRS?

After reading/watching a lot about Event Sourcing, there is one thing I don't fully understand: Events that lead to triggering of other events. Let's take StackExchange's "close question" feature as ...
-2
votes
2answers
69 views

How to call the API once per event-message?

I have X number of servers in NLB listening to an event that gets published by a backend system. I am planning to develop a windows service that listens to the event and then calls an internal API. ...
28
votes
3answers
6k views

Which comes first: event or the change?

I've been researching Event Sourcing, and it seems there are two philosophies hidden within what I've read. The core difference is whether actors in the system are proactive, making changes first and ...
4
votes
1answer
140 views

Are there any pitfalls to having multiple handlers for a command?

We're looking to split up a monolith. In order to do so, we've identified some business areas that look like good candidates for subdomains, and we're trying to figure out how to split the ...
0
votes
2answers
74 views

Should I create one large initial event or break down in smaller events?

I'm experimenting with event sourcing for an application we haven't build yet. No, I won't implement this without any thought, I'm just experimenting. My domain model looks somewhat like this. The ...
2
votes
1answer
404 views

Event sourcing and sync between write and read model

I am creating this project based on event sourcing and cqrs. My write and read model are on different databases (and machines) and are connected through an event bus (in particular I am using ...
0
votes
0answers
13 views

Aggregating events [duplicate]

I am in process of designing a service for estimating time of arrivals based on 2 different events. So the service is subscribing to events which in its most simple for looks like: Job (JobId, ...
2
votes
5answers
210 views

Effective methodology in designing event driven systems

I understand "the works" of event driven systems and I've built simple ones. However I find that I am struggling a bit in efficiently designing one. E.g., Formulating all the events upfront seems not ...
1
vote
1answer
95 views

Decoupling from third party library

I'm doing a project in PHP and I'm implementing Aggregates and Event Sourcing. In order to avoid coding up all the logic related with ES myself I've decided to use a third party library called ...
-2
votes
1answer
59 views

ActiveMQ for event driven architecture

I am using ActiveMQ and I have a scenario where I need to update the event for 100 consumers parallelly. I am looking for a solution where the 100 consumers receive the event parallelly (i.e there ...
3
votes
2answers
149 views

Should microservices in an event sourced architecture not communicate directly with one another via REST/gRPC/etc?

I'm trying to wrap my head around event sourced architectures. It seems like common advice is to have small events with as little info in them as possible (opposed to large events with everything in ...
0
votes
1answer
113 views

Event Sourcing, state in events vs state in projections

I would like to ask what is the preferred way of passing additional state to projections. I have UserAggregate that is watching changes of several attributes of user (for instance address, name and ...
1
vote
0answers
130 views

Design of Spring boot endpoint that returns large amount of data continously until complete

I'm developing a web application using Spring Boot and React, that needs to return information about hotels from different cities: As an input of the controller, I receive a list of cities that can ...
2
votes
2answers
436 views

CQRS - How can a command properly validate when queries are required?

I'm aware that this question has been asked several times, but I have some concerns regarding querying from the write side that I don't see addressed in the already existing questions, more ...
2
votes
0answers
43 views

Event sourcing and state set event

I'm trying out commanded framework for Elixir that implements event sourcing and CQRS (it have abstract structure of command, command middleware, router, aggregate, process manager, projection and ...
1
vote
2answers
192 views

Event Sourcing - Can a read model/projection be used in business rules within an aggregate?

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 ...
2
votes
1answer
85 views

Same Event types for multiple micro-services

In an Event Driven Architecture when there are more than one microservices say A, B that publish same Event say Order_Created and a service C listening to it, performs some actions and publishes an ...
2
votes
1answer
187 views

What is the correct way to get differences for Event Sourcing (C#)

I am looking into Event Sourcing. One of the key points is about saving the differences to the event store rather than objects themselves. This is fine in simple examples. However, I am struggling ...
0
votes
0answers
60 views

Is one to one mapping necessary between Write Applications and Read Applications

Introduction: We have a bunch of micro services (about 40) to serve our customers. To facilitate scaling and audit-ability of selected few micro services we have decided to redesign them using CQRS ...
4
votes
1answer
150 views

Event Sourcing Aggregate Roots - Interaction between aggregates and reconstitution

I have been doing a lot of reading/watching on event sourcing but some things still do not quite make sense. My application is a warehouse management system where we have: Deliveries of stock into ...
1
vote
2answers
341 views

How to manage event dependencies in event-driven architectures?

I'm trying to design an event-driven architecture based on Kafka for messaging but I'm struggling in managing event dependencies. Let's suppose the following service choreography: Service A: emits A-...
2
votes
1answer
556 views

Reducing the code duplication between read and write application in CQRS

I am building an application and trying to embrace Domain Driven design principles, CQRS and event sourcing. We are having two applications one for reading and another for writing. The write ...
2
votes
1answer
147 views

ES/CQRS: How to access additional information in projections

I'm developing an event-sourced/CQRS application and do not understand the best strategy to use when building the read model projections when additional domain data is needed. A partial representation ...
2
votes
1answer
48 views

How specific should administrative compensating events be in a CQRS/ES system?

Are there any best practices around how specific to make events that are generated administratively, say to clean up after one-off operational issues? For example: Say you have a credit card ...
3
votes
2answers
456 views

How to deal with UI data requirements in DDD

I'm using DDD and a CQRS/Event Sourcing architecture so my domain logic is separated in a microservice (e.g: command service) and the read side is in another microservice (e.g: query service). We ...
0
votes
1answer
190 views

Is it overkill to use event sourced actor model with message queue which send commands from gateway?

The gateway uses Rabbitmq with Masstreansit to send commands to services. Some of services require event sourcing in their internal architecture. Since I need my aggregate states available, and the ...
2
votes
0answers
56 views

Should perform query at the point of time for the event or the actual time when working with CQRS for queue system?

I'm trying to implement CQRS for a queue system where user can join a queue by clicking a button. The system will tell the user if queue is full. When the user click the button, it raised the ...
2
votes
1answer
219 views

How to split Aggregate Root that have equal identity?

In DDD, creating smaller aggregates is encouraged where possible, but in a system we are designing we are running into an issue regarding the identity of aggregates. The system evolves around ...
0
votes
1answer
356 views

What's the use of event sourcing and asynchronous message queues for sending commands

In short: Out of order commands end up with out of order events, so does the ordering of the events matter in such situations? Since we are uncertain about the order of commands when an asynchronous ...
4
votes
2answers
381 views

CQRS sequential numbering of business documents

I am currently building a microservice-based system to learn CQRS/ES, Docker, AMQP and all the other goodies that goes with it. I have never asked a question online before as I am usually pretty good ...
1
vote
1answer
217 views

Reduce duplicates in outbox pattern in event driven systems

Trying to implement the outbox pattern for an event driven system. The outbox pattern in a nutshell is a way to ensure system events are sent to the event log/queue/bus at least once (using the term ...
0
votes
1answer
275 views

How to handle Domain Event handlers ordering

Background: we have 2 bounded context: Inventory and Sale application context is Point-of-sale system Scenario: When a Checkout happen on Sale BC, we would like to decrease quantity in Inventory. ...
2
votes
2answers
146 views

Is it a bad practice or uncommon to save “Invalid operation attempted” events in an Event Store when doing Event Sourcing?

I have a simple toy project that deals with Banking operations (cash deposit, withdrawals, wire transfers, open and close accounts). I am wondering whether there is something wrong about saving ...
1
vote
2answers
1k views

“event sourcing” vs. “event logging” architecture pattern?

Can event sourcing be considered as the same architecture pattern as event logging? Right now we plan to Kafka (or Kinesis) as a pub/sub persistent event data store. We shall not be implementing any ...
1
vote
1answer
256 views

Command Waiting On Event Sourcing Micro-services

I'm very new to micro-services but am trying to learn, so apologies for any ignorance or incorrect information. I have been looking at event-sourcing architecture for microservices and I have a ...
1
vote
2answers
231 views

F# DDD Bank Modelisation: Aggregate Design for Event Sourcing

I am designing a toy project dealing with the bank account management in F# with Event Sourcing. I would like to get a bit of review (not really a code review) about my Commands and Events to see if ...
2
votes
0answers
56 views

Event Sourcing & Redis

I'm using StackExchange.Redis library, it seems perfect. Hard-coded events related BankAccount with ID 1: // UNSORTED COLLECTION public static List<Event> DomainEvents = new List<Event>()...
0
votes
1answer
166 views

Why shouldn't an event pertain to multiple aggregates?

In my experience, it is often said that in event sourcing "an event must belong to one aggregate" and also "an aggregate is your biggest transactional boundary". Why is this? What harm would come of ...

1
2 3 4 5