Questions tagged [domain-events]

130 questions
2
votes
1 answer

Domain event storage in SQL... use JSON serialization?

I'm looking at refactoring an existing code-base before we let it loose in the wild with our first customer, and I really don't like the current domain event storage structure and I was trying to come up with a good way to store the many & very…
BreakerOfStones
  • 529
  • 5
  • 18
2
votes
1 answer

Transitioning a referenced aggregate root to another aggregate root

My system has the language of a "Contact" which is a sort of "ghost user" that we have some information on - it's validation rules are slim and it's state is largely contact information. We also have a concept of a "User" which is a fully-vetted and…
Chris Tickner
  • 2,008
  • 2
  • 20
  • 24
2
votes
3 answers

What if domain event failed?

I am new to DDD. Now I was looking at the domain event. I am not sure if I understand this domain event correctly, but I am just thinking what will happen if domain event published failed? I have a case here. When a buyer order something from my…
2
votes
1 answer

Asynchronous communication between ACL and BoundedContext

We are following DDD for a project... We need to access a legacy application from a bounded context . So we create an Anti corruption layer.. However we have a problem... The method that we are executing in the ACL is asynchronous and returns the…
Sabarish Sathasivan
  • 1,196
  • 2
  • 19
  • 42
2
votes
1 answer

How is ApplicationEvent different from DomainEvent?

In the DDD Sample, Cargo Tracking application, there are "ApplicationEvents" and DomainEvents. ApplicationEvents examples: "cargoHasArrived", "cargoWasMishandled" DomainEvent example: "HandlingEvent.LOAD", "HandlingEvent.RECEIVE",…
Jason
  • 2,006
  • 3
  • 21
  • 36
2
votes
1 answer

How to make Aggregate Root method only accessible for a Domain Event and nothing else.

I have two aggregate roots... AR1 and AR2. AR1 holds a collection of references (IDs) to instances of AR2. Inside one of the AR1 methods a domain event is raised to update the collection of AR2 instances. The domain event is raised after the…
2
votes
1 answer

Raising Domain Events For Multiple Subscribers

I am stating to look into the Domain Events pattern and have read a lot of resources on the subject but I cannot find a good way of implementing for our requirements. Basically we have a Service/Domain layer which wraps the repository layer for…
user351711
  • 3,171
  • 5
  • 39
  • 74
2
votes
1 answer

Domain Events and Commands in Distributed System (DDD)

Lets say i have distributed architecture (client-server). On client side there is ServerEntity class, on the client side its ClientEntity class. I want ClientEntity simply to request some data from ServerEntity. I started learning DDD approach…
garf
  • 53
  • 1
  • 5
1
vote
1 answer

Publishing one generic fail event and attaching data to it or publish multiple specific fail event

So we have a scenario where we are creating credit cards. We have CreateCardConsumer that internally implements a strategy that decides which credit card provider API will be used (currently, we have two, let's call them, Provider1 and…
emirkljucanin
  • 804
  • 1
  • 9
  • 20
1
vote
0 answers

C# Casting to Interface Type with DomainEvents

I am working on handling domain events on save by adding them to a List on our Entities. public abstract class Entity { public List DomainEvents; // code truncated } my interface for IDomainEvent and Handlers are as…
1
vote
1 answer

How to propagate consequent changes inside the same Domain entity

In a Domain Driven Design implementation with CQRS and Domain events, when a Command's handler performs a "change" on a Domain entity, and this "change" also causes more "changes" inside the same entity, should all these "changes" be performed by…
thomas_p
  • 97
  • 1
  • 14
1
vote
1 answer

Event sourcing and Domain Event

What is Event sourcing and what is Domain Event. I read both the articles and I am not be able to get it properly. So, please describe it in easy words. And what is the difference between them? Are domain events and event driven are same?
1
vote
2 answers

DDD: Handle domain events directly in aggregate?

Our subdomain has two primary aggregate types: Locations and pallets. Each location keeps track of how many pallets it holds, and each pallet can only be placed on one location at a time. Assume that there are many instances of each type and their…
domin
  • 1,192
  • 1
  • 7
  • 28
1
vote
1 answer

Should operations on aggregate root that cause changes in child entities raise the child domain events?

Let's say that we have an Entity (the Root) with a property identifier, and another Entity (a child / local entity to Root) with a property name, with the rule that the Child's name must start with the Root identifier. There is a changeIdentifier…
technicated
  • 169
  • 1
  • 9
1
vote
1 answer

How should I load historical events from another service?

I have a User Microservice, that publishes events when a user is created, modified, or deleted. In addition, I have a Calendar Microservice that needs the user data. The Calendar service, subscribes to the user events and keeps a read only copy of…
1 2 3
8 9