Since the discussions have been fired up on this group and I’m getting a huge amount of ideas and valuable feedback, I thought I’d throw another topic “in the mix” and see what happens.
The domain package in Axon Core currently contains two major domain concepts: the Aggregate and the Event. However, if I look back at my own workshops, I always talk about Commands, Aggregates and Events as being the building blocks for the “Core” of a CQRS application. Until now, the command was any POJO.
Now that the discussions on the Event are moving toward the Axon Event being a container for a POJO and some meta-data, I got the itch to do the same with the Command. The Command interface would provide access to the meta-data and the payload, which contains the application specific information.
The idea is that the @EventHandler and @CommandHandler annotated methods are allows to use the payload as parameter, as well as the entire Event or Command.
So my question to you is: should Axon 2.0 have an explicit command interface, or not?