Late follow-up question on jars/module: do you put your aggregate root definitions in different jars than the commands and events so that "clients" can just import the command and event definitions without importing any of the capability side?
Late follow-up question to to be sure I'm tracking with you because this is the granularity I was thinking as well but want to get the separation correct before making a bunch of maven modules :)
If we have separate client processes sending commands or queries over distributed bus (for location independence) then would your jars look something like this (assuming the agg type is "acct":
acct-cmd-api.jar - Commands and events only
acct-cmd-svc.jar - Aggregate root - depends on acct-client-api for command and event definitions
acct-cmd-server.jar - spring boot jar that depends on acct-cmd-svc.jar (and transitively acct-cmd-api.jar)
acct-query-api.jar - For use by clients that only need to query, contains queries and return data types
acct-query-svc.jar - Contains the implementation of the query service, depends on acct-query-api.jar
acct-query-server.jar - spring boot jar that depends on acct-query-svc.jar and transitively acct-query-api.jar
Regards,
Mac