In all the examples of CQRS I've seen, the domain events trigger updates to the read model but nothing else. But what about when you want a domain event to cause other changes in the domain?
For example, assume you have the following requirements:
- when the "close account" button is clicked, close the account
- when the account is payed off, close the account
- when an account is closed, mark the account owner as "special"
What's the best way to handle this?
- Make Account.Close() create a AccountClosed event and also mark the owner as "special"
- Make an AccountClosed handler that marks the owner as "special"
- Make an AccountClosed handler that submit a MarkOwnerAsSpecial command
- Make the command handlers that close the account also mark the account owner as "special"