[axonframework] queryHandler on aggregate - skip projection

While this topic was simultaneously adressed in another thread, here’s a brief response:

You can! There is no strict requirement to apply CQRS when using Axon. In some cases, it might make perfect sense to have a model that is used for writes as well as some reads. Be careful, however, while the single model might be simple now, in the future, when requirements evolve, it may mean that you’re introducing accidental complexity. And this requires aggregates to be state-stored to be sensible.

Also, putting @QueryHandler methods on an aggregate, besides technically not possible at the moment, only has limited use: you’d only be able to query the state of a single aggregate.

Cheers,

Allard