I'm trying to organize DDD project using hexagonal architecture in java 9 (using maven modules). Is there anywhere working example that is already being used in productions systems? So, far I have only some idea how to do this:
Here I have domain
module which has all commands, events, domain model (with aggregates, entities and value objects), and repository interfaces + domain service interfaces (if relay on infrastructure) and implementations. Other application
module holds application services where I have "use-cases" of the application (simple methods that orchestrate loading of aggregates etc.).
Now what about these adapters in hex architecture? Should every adapter be separated in module (e.g. mysql-adapter
where I could implement repositories that rely on infrastructure? Also, having separate module for rabbitmq aggregate?
Any examples on this would be great!