AxonFramework icon indicating copy to clipboard operation
AxonFramework copied to clipboard

Revise use of Aggregate Member `ForwardingMode`

Open marleinevankampen opened this issue 7 years ago • 0 comments

In Axon Framework 3 and 4, the event forwarding mode defaults to a ForwardAll for aggregate members.

However, this is not the default users would expect when developing their Aggregate. Instead, they expect an event that originates from a given aggregate member instance to only be handled by the root member (i.e. the class containing the aggregate member) and the matching instance.

Hence, the default should switch from ForwardToAll to ForwardMatchingInstances.

Furthermore, as described in this issue, it might be beneficial to allow a means to configure the ForwardingMode for the entire Aggregate in one go. Currently, the only approach is to set a property on the @AggregateMember annotation.

Instead, it would be great to have a property on the AggregateConfigurer (or what this might look like in Axon Framework 5) to set this behavior. Note that the configuration API should receive an option like this anyhow, given that we want to allow a cleaner annotation-less use of Axon Framework.

marleinevankampen avatar Jan 11 '18 13:01 marleinevankampen