Closed coderbyheart closed 11 years ago
How can I get notified of an exception in the command chain then?
Ok. CQRS introduces eventual consistency. CQRS also means that you should assume that every command succeeds. To verify that a command worked, use a query. Failed commands should notify to user, though.
I've created PR #31 which clarifies the behaviour of SequentialCommandBus.
How about we create a CommandFailed event, so exceptions would not be silently dropped?
Just because you use the CommandBus dosent mean you also you the EventBus.
Subcommand exceptions should not be thrown imho. Say you have a command that triggers $N events, and several of those trigger new commands. If one command fails, then this is just the way it is, but everything else should not be stopped because of it. It will create very weird inconsistent states.