Hey Neil,
> I understand the idea that aggregate roots represent a consistency
> boundary, and that as such transactions should not span multiple
> aggregates.
I gather opinion on this varies somewhat.
The definition of aggregate as a consistency boundary requires that
changes to one aggregate / events stemming from one aggregate must be
persisted in one transaction.
This does not forbid storing multiple aggregates' events in one
transaction.
The fundamental question is whether a single command may *or* must not
affect multiple aggregates.
Very often it is convenient to allow one command (your transfer example)
to affect multiple aggregates. It saves you from implementing messaging,
(sagas) to mimin transactional behavior.
>
> Am I worrying over nothing?
No, there is a downside (convenience always comes with a price tag ;)).
If you take this approach, you lose the ability to easily shard across
multiple servers.
If you take the one-command-one-aggregate approach, sharding is trivial
to implement since you already have messaging in place.
Also, you move the routing/collaboration logic which would be contained
in the saga either into the command handler or in one of the
collaborating aggregates. This need not be a bad thing, but should be
considered as you take additional dependencies.
Finally, you might actually not want to execute a "business" transaction
in a technical transaction. This hides the message flow which might
contain information valuable to the business.
Cheers
Phil