Questions tagged [event-sourcing]

The tag has no usage guidance.

1
vote
1answer
25 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
0answers
32 views

Same events for different aggregates in CQRS?

I'm developing an application using CQRS + ES. Now I have 2 aggregates which are technically almost exactly the same, only they are different concepts in the domain. Therefore I will separate them ...
0
votes
1answer
64 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. ...
1
vote
2answers
112 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
207 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 ...
0
votes
1answer
82 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 ...
0
votes
2answers
77 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 ...
0
votes
0answers
17 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
0answers
46 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 ...
0
votes
1answer
36 views

Where to store side effect state in an event sourcing system

I also had a look at How do I deal with side effects in Event Sourcing? but the solution wasn't clear to me. If I store "EmailSent" event in the event stream, I might issue the external request to ...
1
vote
3answers
55 views

Event sourcing: event's data (payload) vs metadata

There is often introduced a concept of using metadata in events. I just would like to understand the difference between data (which is referred to as payload) and metadata. I've read what I could ...
0
votes
2answers
55 views

Event sourcing in microservices: separate event stores + system-wide event store?

Say each microservice is using event sourcing which means it has it's own event store, do you typically add another "mother" event store that contains all events from all microservices as a source of ...
0
votes
0answers
33 views

Using notifications when communicating between services in an event sourcing architecture?

In the context of web apps, I'm trying to get my head around how an event sourcing architecture communicates to services. First, I thought of services constantly polling the event store, but then, ...
0
votes
1answer
55 views

Can Aggregate shared between services?

I am working in an event-sourcing architecture and while creating the aggregates I came to an interesting challenge, disclaimer I'm new to this. I have a UserAggregate encapsulating the logic for ...
1
vote
1answer
102 views

DynamoDB - Event Store on AWS

I'm designing an Event Store on AWS and I chose DynamoDB because it seemed the best option. My design seems to be quite good, but I'm facing some issues that I can't solve. The Design Events Events ...
0
votes
1answer
151 views

How to maintain consistency on write when using Event Sourcing on a Banking System

We have a system that holds credit balances, and we thought event sourcing would be a good fit. Getting the current balance by reading from an eventually consistent projection works. However, I ...
0
votes
1answer
50 views

How to approach to ES/CQRS in serverless cloud?

Let's say I want to use CosmosDB for Event Store, where have single collection for all events. Currently it is not horizontally partitioned, but it is a possibility for future. Now, I need to ...
0
votes
0answers
108 views

EventSourcing / CQRS Implementation with ASP.NET Core WebApi and Azure Cosmos DB

I was looking for an easy implementation of the Event Sourcing and CQRS Pattern in ASP.NET Core using Azure Cosmos DB as Event Store. As I couldn't find anything appropriate I decided to write a ...
3
votes
3answers
159 views

How to model User behaviour that can be shared between microservices in Event Driven architecture?

I have an Event Sourced system that has 3 micro services (simplified): User management - Registering a user, change password etc User account - manages debiting/crediting of the user account balance ...
1
vote
2answers
75 views

CQRS and Transactional Event Sourcing, problem while recreating Read DB

I'll first explain the context of my problem. The backend of my current project is using DDD, CQRS and Event Sourcing as a stack (the read DB being a MongoDB, my write DB being an event store). At ...
1
vote
2answers
72 views

How to deal with delayed updates?

I have a microservice-based system that has a product service and a store service. I'm using eventstore to propagate events between microservices, so for example when a product is created, the store ...
2
votes
1answer
53 views

Would Command Sourcing fit better than Event Sourcing in my case

I have the following case: We register data from sensors. Let's say that it is a value reported every second, for one hour a day. So we have over 3k values. These values are processed to try and ...
0
votes
1answer
36 views

Event sourcing access by reference

In an event sourcing architecture, what is the typical pattern for passing information about related objects (aggregates)? For example, in a order processing system, should OrderCreated event (...
0
votes
1answer
372 views

Confused about commands, domain events and external events in event sourcing

I'm a little confused about commands role in event sourcing distinction between domain and external events If my understanding is right a command represents an action initiated by an actor in terms ...
0
votes
2answers
317 views

DDD - Modifying multiple entities under multiple aggregate roots

In our domain we have a concept of billable activities that get logged by a user. The modeling is pretty straightforward -- the User is an aggregate root, with the Activities being a collection under ...
0
votes
1answer
211 views

CQRS with an Event Log and without Event Sourcing

I am trying to understand the difference between an event log and event store in the context of event sourcing. A really nice explanation I found is that an event store is the single source of truth ...
1
vote
1answer
154 views

is Event sourcing using Database CDC considered good architecture?

When we talk about sourcing events , we have have a simple dual write architecture where we can write to database and we can write the events to a queue like Kafka . Other downstream system can read ...
3
votes
1answer
88 views

DDD - Aggregate that changes “owner” mid-process

We're evaluating CQRS/ES for a high-volume subsystem in our app in order to take advantage of distributed systems and ensure uptime. This is my team's first time implementing this architecture, and I'...
1
vote
0answers
45 views

Event based architecture - multiple producers single consumer

I'm having a discussion at work that event-based architecture should not be used in a scenario that we have multiple producers and a single consumer. In our company, we have many external ...
7
votes
1answer
941 views

What is the difference between Event Driven and Event sourcing?

I'm studying domain driven design (DDD) and came across terms: Event Driven and Event sourcing. I know it's about publishing event from producer to consumer, and store the log, so my question is: ...
0
votes
2answers
354 views

Maintaining order of events with multiple consumers in a typical pub sub scenario

I am using Kafka. I am developing a simple e-commerce solution. I have a non-scalable catalog admin portal where products, categories, attributes, variants of products, channels, etc are updated. For ...
2
votes
1answer
132 views

How are events in the context of Event Sourcing different from Commands?

In the context of domain-driven design, events usually describe something that has already happened (domain events, integration events). Commands on the other hand are directives that may or may not ...
2
votes
1answer
75 views

Should I store an event stream or just state for a frequently changing entity?

I am building a CQRS-based application with Kafka Streams. For most entities in my application this entails event sourcing: capturing state mutations as events and transforming them into state which ...
2
votes
1answer
397 views

How to model domain events so that the denormalizers can fill highly denormalized read models

I have been working with a software strongly relying on the event sourcing and CQRS patterns for a few time and I'm trying to figure out how to properly model the domain events in relation to the ...
2
votes
2answers
111 views

Denormalising a CRUD and ES bounded context for rich queries

As a small snapshot of my product, I have 2 bounded contexts, one which is a rich domain with defined events and invariants, operating on files implemented as CQRS/ES, and the other a CRUD store of ...
0
votes
1answer
60 views

Domain events or services to achieve domain model consistency?

Recently began implementing domain events in my domain layer which really allows me to decouple the application from the domain. Eventually, I would like to get a full-scale CQRS w/Event Sourcing ...
5
votes
2answers
217 views

How can we keep sight of business flows in event driven architectures?

I am planning to set up an event driven architecture using Spring Boot apps that publish and read messages from a Kafka broker. Let's suppose it were an e-commerce application with the usual events (...
2
votes
3answers
357 views

get aggregate id based on its data in it

I have an aggregate root called SizeRangeAggregate which holds the range of size of clothing piece dimension and price for that range. I created an post rest API which create new SizeRangeAggregate. ...
0
votes
0answers
12 views

Is there any value in passivation (setReceiveTimeout) for persistent actors without read store?

I am not experienced in Akka, so my assumptions may be completely wrong. As far as I understand, Aggregate Root may manage its entities either just keeping their state internally and restoring it at ...
-1
votes
3answers
346 views

What is a CRUD system?

I am learning Event Sourcing in my spare time. I see lots of references to 'CRUD type systems' online. I understand a CRUD type system to be: 1) A database driven system (website or application) i....
13
votes
7answers
759 views

Saving high-frequency events to a connection-limit constrained database

We've got a situation where I have to deal with a massive influx of events coming in to our server, at about 1000 events per second, on average (peak could be ~2000). The problem Our system is ...
6
votes
4answers
361 views

How to emit events idempotently

If I have a service that consumes events of type A and emits events of type B, how can I make sure that event B is only emitted once for every event A? Should the service also subscribe to events of ...
0
votes
1answer
248 views

Implementing CQRS inside a Microservice

I am considering a CQRS refactoring process. It is more of a learning exercise in my spare time. The use case is similar to a price comparison website where a user enters their details for a ...
5
votes
4answers
1k views

How to handle transactional operations in an event-driven architecture?

I'm trying to flesh out an eCommerce system using microservices (.NET Core and Kubernetes), event sourcing (Kafka), and CQRS. The particular use case I've been thinking about is as follows. There is ...
0
votes
1answer
160 views

What is the correct granularity for events in the context of designing a rule-based decision system?

Introduction We need to design a system that, given a set of events that are happening in the source application, reacts to them and if some conditions have been met, actions can be triggered. Users ...
3
votes
3answers
174 views

What to do when an aggregate is given a bad event?

What is usually done when an aggregate is asked to apply an "impossible" event to its state? For example, if a ShoppingCart aggregate has already applied a CustomerAckRec (The customer has ...
2
votes
2answers
153 views

Event Sourcing CQRS and request events ending at Requested

In ES/CQRS, do/can we treat requests as events? Consider the following flow A guest visited some url and posted data to create a new account. Here is one way to implement it 1- Invoke ...
1
vote
3answers
244 views

Event Sourcing - Reconstituting Aggregate from Wrong Event Stream

I am working on a project to help learn DDD and am trying to do CQRS and Event Sourcing. Code is in C#. For this example, lets say I have 2 aggregates, Customer and Product. My aggregate repository ...
0
votes
1answer
240 views

Dealing with eventual consistency when persisting and publishing events

Currently working on a DDD application that is using event sourcing with redis as my main persistence store. So unfortunately I do not have built in rollbacks should something fail. The application is ...
-1
votes
1answer
21 views

Data store for sequential key-value, time limited event “journal”

I'm designing a system in which a key component acts like a "journal", in the sense that it stores a list of sequential events that can change the state of the entire system. Upon request, any other ...