How does one manage read state within an event sourcing infrastructure ? Lets say I receive a new event to add a user. Before I can add the user to the event store I will need to ensure the user does not exist. Considering event stores can’t be queried like a normal RDBMS, how would I aggregate the events into such a way that I am able to query it ?
I was planning on using live projections and have a variable called “state” which can be looped to see if the aggregiate exists but I am not sure if it offers realtime updates or whether it might be too slow which could give rise to duplicates.
Please advise