I think we have a good starting point now for resolving concurrent changes to aggregates. 🎊
In the end it would be nice to have the uow return a proper result to the command-handler for indicating concurrency conflicts, instead of raising exceptions, as is done right now.
We could then introduce a conflicts channel to the message-bus, which would enable us to send feedback to the command issuer and other interested parties.
This would leave exceptions for indicating serious problems only e.g. failing connectivity etcetera, thus making it easier for the command-handler to distinguish between the latter kind of failure and domain defined errors.
It might even make sense to add another channel: errors to the message-bus for sending information on exceptions. As commands have this notion of fire and forget, this could be a nice way to ensure feedback is given to the command issuer in every case.
I think we have a good starting point now for resolving concurrent changes to aggregates. 🎊 In the end it would be nice to have the uow return a proper result to the command-handler for indicating concurrency conflicts, instead of raising exceptions, as is done right now. We could then introduce a
conflicts
channel to the message-bus, which would enable us to send feedback to the command issuer and other interested parties. This would leave exceptions for indicating serious problems only e.g. failing connectivity etcetera, thus making it easier for the command-handler to distinguish between the latter kind of failure and domain defined errors. It might even make sense to add another channel:errors
to the message-bus for sending information on exceptions. As commands have this notion of fire and forget, this could be a nice way to ensure feedback is given to the command issuer in every case.