Questions tagged [domain-events]
130 questions
3
votes
2 answers
DDD: Where to Place Domain Events
I just read Vernon's book "Implementing Domain-Driven Design". What I couldn't find is where to put your Domain Event's classes.
In the same namespace as your aggregates?
In a sub-module like .Events?
Or a hybird: same…

David Rettenbacher
- 5,088
- 2
- 36
- 45
2
votes
1 answer
Queuing domain events in C#
This article describes a great pattern called 'Domain Events': http://www.udidahan.com/2009/06/14/domain-events-salvation/
One major flaw with this pattern however is highlighted in comment 27 by user Andy: If a transaction fails, we don't want our…

cbp
- 25,252
- 29
- 125
- 205
2
votes
2 answers
Application Events in DDD?
This question is similar to: Does exist application event term in DDD? , but I don't know how to apply the explanations given there to my specific issue.
I have a SearchFilmUseCase and I want to raise an event FilmSearchedEvent once it finishes its…

vicaba
- 2,836
- 1
- 27
- 45
2
votes
1 answer
DDD: Blocking External Service Calls and Events
I’ve been circling the best approach for integrating an external service into my domain.
There are a number of third-party services that can be used, so we have an Adapter providing a common interface. We only have X number of instances of the…

Steven
- 823
- 8
- 25
2
votes
1 answer
DDD: Entity with collection of value objects - One event or multiple?
Imagine an instance where we have an entity that has a collection of value objects.
If we were to add (say the domain concept is to assign) an additional record value object to the collection we would have something…

Steven
- 823
- 8
- 25
2
votes
1 answer
Entity persitance inside Domain Events using a repository and Entity Framework?
I am delving into domain events and need some advice about persisting updates to an entity for history reasons. My example deals with a User entity and Signing In:
public class UserService
{
private UserRepository _repository;
…

DDiVita
- 4,225
- 5
- 63
- 117
2
votes
2 answers
How to update read model in CQRS pattern on schema change of write model database?
While using CQRS pattern with domain events to generate read model.
If we add new column in database with some default data or insert new row directly from sql query manually, in that case no events are generated so how to update the existing…

kailashdesiti
- 165
- 1
- 13
2
votes
1 answer
How to generate read data in CQRS from existing write database?
Currently we have an Asp.net application which uses SQL server for write and also read queries as a normal monolith application.
Now we want to move to CQRS.
In CQRS the read model is generated on basis of events.
But for the previous transactional…

kailashdesiti
- 165
- 1
- 13
2
votes
3 answers
DDD - Multiple Bounded Contexts because of differing aggregate data?
We try to split up our domain into bounded contexts with the goal to have a modular application design/architecture.
We did an enlightening EventSorming session which helped us a lot to identify bounded contexts and its aggregates. After the…

Oliver
- 353
- 1
- 4
- 16
2
votes
1 answer
DDD: Syncing bounded contexts causing different domain behavior/logic
I am currently working on a DDD system that is composed out of several bounded contexts. 2 of them are:
Context "account management": Only staff members are allowed to work here. The idea is to manage customer accounts (like address, phone numbers,…

maschinenzuechter
- 221
- 1
- 7
2
votes
0 answers
Is there some way to keep domain events context unaware with NServiceBus 6 and the removal of IBus?
I'm wrestling with a situation where we currently use the IBus interface (NServiceBus v5) in domain event handlers to send commands to a backend service for processing. With the IBus, these commands could be sent regardless of what triggered the…

carmbrester
- 910
- 1
- 8
- 21
2
votes
1 answer
Domain Driven Design (Domain Events) for ASP.NET Web API
What is the best way to implement DDD/CQRS for Web API project as I still don't quite understand how to get the response when calling other service from a Web API. I read about Rx observable stuff but I would like a more clear explanation and simple…

Riza Marhaban
- 368
- 6
- 20
2
votes
1 answer
DDD in PHP -> Projector -> Where and when should the register method be called of the projector?
I'm currently reading about projections from the book DDD in PHP and I'm confused when and where to call the register method from the projector class.
Flow: CreateNewTaskRequest -> CreateNewTaskService -> Task::writeFromNew() ->…

Menno Horde
- 51
- 5
2
votes
1 answer
DDD in PHP -> DomainEventPublisher -> Where to use the subscribe method?
The flow:
CreateNewTaskRequest -> CreateNewTaskService -> Task::writeFromNew() -> NewTaskWasCreated(domain event) -> DomainEventPublisher calls handle on subscribers.
Following the flow above, I'm wondering where do you add subscribers for domain…

Menno Horde
- 51
- 5
2
votes
1 answer
DDD: Applying Event Store in a legacy system
Our current system is a legacy system which doesn't use domain events. We are going to start publishing domain events.
Other bounded contexts are going to listen to these domain events, but only from the time we start publishing, losing all the past…

martinezdelariva
- 5,011
- 2
- 25
- 30