Concurrent command execution does not result in Aggregate conflict error

Skip to first unread message

vineet tiwari

Sep 19, 2020, 9:06:37β€―AM9/19/20
to Axon Framework Users

When two commands for the same aggregate and same expected aggregate version are executed at same time in 2 diff pods, both of them go through resulting in inconsistent state of aggregate, instead of throwing Conflict exceptions.

I checked the code we are validating version only when we are loading aggregate, which might have changed between load and save

Can you please guide if I am doing some thing wrong or it is desired behaviour of axon


Steven van Beelen

Sep 21, 2020, 5:45:39β€―AM9/21/20
to Axon Framework Users
Hi Vineet,

The concurrency exception should come from the storage of the event.
This holds due to the uniqueness constraint of the aggregate-identifier / sequence-number pair, which if clashed throws firstly a database/AxonServer exception, followed by a ConcurrencyException.
Thus if the same Aggregate is loaded on two distinct instances for command handling, both will ultimately want to store an event.
It is here where you are covered, as the events define the state of your aggregate.

So, unsure what your exact set up is that this isn't happening for you.
Axon versions, any extensions or other configuration specifics would be good to share here.

Ow and by the way, for future questions I'd like to ask you to go to our new, as the mailing list will be discontinued on the 28th of September.



❗ Please note that this mailing list will be discontinued on September 28 ❗
We are moving to and we do hope you'll join us there.
For more details please see

You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages