You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using EventFlow in one of our projects and am now looking to expand its adoption across additional applications. However, I'd like to implement a granular event sourcing strategy — meaning that different parts of the application would adopt different levels of event sourcing.
For example, one part of the system might only use CQRS for now, potentially adopting full Event Sourcing (ES) later, while another part might fully adopt ES from the beginning. This behavior would be controlled at the aggregate root level. Here's what I mean:
We have two aggregate roots:
Account
Payments
For the Account aggregate, I plan to use full Event Sourcing. It's a small aggregate where I need a clear, auditable history of all changes.
For the Payments aggregate, the scenario is different. It’s also a simple aggregate, but the only operation is to record a payment. In this case, using full event sourcing would just result in a single event for creation. So, it makes more sense to go with a state-based model, leveraging CQRS without full ES. Still, I want to keep all the benefits of EventFlow — like command idempotency, domain event publishing, and subscribers.
My question is:
Is there an established or recommended way to implement this kind of hybrid model in EventFlow?
From what I’ve explored so far, it seems I might need to implement custom versions of IAggregateRoot and IAggregateStore to support both flows.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, how are you?
I'm currently using EventFlow in one of our projects and am now looking to expand its adoption across additional applications. However, I'd like to implement a granular event sourcing strategy — meaning that different parts of the application would adopt different levels of event sourcing.
For example, one part of the system might only use CQRS for now, potentially adopting full Event Sourcing (ES) later, while another part might fully adopt ES from the beginning. This behavior would be controlled at the aggregate root level. Here's what I mean:
We have two aggregate roots:
Account
Payments
For the Account aggregate, I plan to use full Event Sourcing. It's a small aggregate where I need a clear, auditable history of all changes.
For the Payments aggregate, the scenario is different. It’s also a simple aggregate, but the only operation is to record a payment. In this case, using full event sourcing would just result in a single event for creation. So, it makes more sense to go with a state-based model, leveraging CQRS without full ES. Still, I want to keep all the benefits of EventFlow — like command idempotency, domain event publishing, and subscribers.
My question is:
Is there an established or recommended way to implement this kind of hybrid model in EventFlow?
From what I’ve explored so far, it seems I might need to implement custom versions of IAggregateRoot and IAggregateStore to support both flows.
Beta Was this translation helpful? Give feedback.
All reactions