buckpal icon indicating copy to clipboard operation
buckpal copied to clipboard

How can I publish domain event?

Open ByeongUkChoi opened this issue 3 years ago • 0 comments

I want to publish domain event when changed domain. What should I do?

For example

public class Account {
    public boolean withdraw(Money money, AccountId targetAccountId) {
        // codes..

        Event.raise(new AccountWithdrawEvent(targetAccountId, money));    // <-- here
    }
}

ByeongUkChoi avatar Mar 23 '21 13:03 ByeongUkChoi