So I just found the problem on my project which is related to set base consistency validation. I have read the suggested solution on the axon blog, but It requires some additional memory for the lookup table. I wonder if this is possible since AxonServer stores every events anyway can I just make the email field on event become unique(maybe using annotation like mongodb does have) and if the new event comes with duplicate email it could not save this event to EventStore and throws the error on Aggregate. I expect something like this.
data class AccountCreatedEvent( val firstName: String, val lastName: String, @Unique val email: String )
So it will change database schema for the event store become like this.
event_id email(unique) firstname lastname 2 jonh@mail john john 1 jane@mail jane jane
But I don’t even know how AxonServer stores events and if this is possible to do.