Questions tagged [domain-events]

130 questions
8
votes
2 answers

CQRS and synchronous operations (such as user registration)

I'm in the process of adopting DDD concepts for designing our next projects, and more specifically CQRS. After reading a LOT of stuff I'm now trying to implement a simple Proof Of Concept. The thing is I'm stuck right after I started :p I'm trying…
Benjamin
  • 382
  • 4
  • 12
7
votes
1 answer

Domain driven design and domain events

I'm new to DDD and I'm reading articles now to get more information. One of the articles focuses on domain events (DE). For example sending email is a domain event raised after some criteria is met while executing piece of code. Code example shows…
Karel Frajták
  • 4,389
  • 1
  • 23
  • 34
7
votes
2 answers

Domain Event pattern implementation in Java?

I'm searching for a simple Java implementation of Udi Dahan's Domain Events pattern and infrastructure as detailed in this article. It's pretty simple and I've implemented my own interpretation, however I'm a Java novice and don't want to be bitten…
HolySamosa
  • 9,011
  • 14
  • 69
  • 102
6
votes
3 answers

Domain Driven Design (DDD): Domain Event Handlers – Where to place them?

I am confused about where to handle domain events in an application that is based on the hexagonal architecture. I am talking about the bounded-context-internal domain events, and not about inter-context integration/application/public…
6
votes
3 answers

How are domain events dispatched from within domain objects?

Domain objects shouldn't have any dependencies, hence no dependency injection either. However, when dispatching domain events from within domain objects, I'll likely want to use a centralised EventDispatcher. How could I get hold of one? I do not…
Double M
  • 1,449
  • 1
  • 12
  • 29
6
votes
2 answers

DDD generic vs. specific domain events

I'm looking at domain events, specifically at 2 possibilities: A. Using "generic" events like that: public class OrderStateChangedEvent : IEvent { public Guid OrderId { get; } public OrderState NewState { get; } } then the consumer would figure…
Lev
  • 309
  • 1
  • 12
6
votes
2 answers

CQRS - can EventListener invoke Command?

I want to use elements of CQRS pattern in my project. I wonder if i do it right with Command and Events. The thing that I'm not sure is if event can invoke command. To better show what i want to do I will use diagram and example. This is an…
geek
  • 596
  • 8
  • 26
5
votes
2 answers

Can a domain event be emitted without being part of an aggregate state change (DDD)

I would like to know how can a domain event be implemented (in DDD) if it is not a natural result of an aggregate's state change. I will borrow the example of this post. So lets say that we need an event like: temperatureWasMeasured which could be a…
5
votes
2 answers

structuremap ObjectFactory.GetAllInstances>()

I am having a rough time implementing eventing in a recent project. I have verified that structuremap is scanning properly assemble and adding EventHandlers Scan(cfg => { cfg.TheCallingAssembly(); …
TheMar
  • 1,934
  • 2
  • 30
  • 51
5
votes
2 answers

DDD - How handle transactions in the "returning domain events" pattern?

In the DDD litterature, the returning domain event pattern is described as a way to manage domain events. Conceptually, the aggregate root keeps a list of domain events, populated when you do some operations on it. When the operation on the…
Normand Bedard
  • 2,625
  • 2
  • 19
  • 22
5
votes
0 answers

Handling Domain Events asynchronously

I have implemented domain events as prescribed in Udi Dahan's Domain Events - Salvation article. As far as I understand, domain events can be run asynchronously to the thread from which it was raised (typically from a domain model or service). …
5
votes
4 answers

Domain events and versioning without CQRS

Hi I have the following senario which I dont understand how to get eventual consistency with: User 1 uses Task based ui to change customer name App Service calls operation on the aggregate Aggregate fires event on customername changed bus sends…
5
votes
1 answer

Using Ninject with Udi Dahan's Domain Events

I'm using Ninject in an MVC project and am trying to implement Domain Events following Udi Dahan's pattern http://www.udidahan.com/2009/06/14/domain-events-salvation/ In the extract below, the "Container" is used to resolve all the event-handlers…
4
votes
0 answers

Domain Events vs Event notification vs Event-carried state transfer ECST in event driven architecture, implementing Domain Driven Design (DDD)

I would like to clarify in my mind the way different kinds of events could be implemented in a EDA system (system with Event Driven Architecture) implementing DDD (Domain Driven Design). Let assume that we are not using event sourcing. More…
4
votes
4 answers

Best practice for naming Event Types in Event Sourcing

When building an event store, the typical approach is to serialize the event and then persist the type of the event, the body of the event (the serialized event itself), an identifier and the time it occurred. When it comes to the event type, are…
Steven
  • 823
  • 8
  • 25
1
2
3
8 9