I am writing a feature that allows our development and QA teams to restore an EventStore instance to a known state. This is highly desired for both functional and performance testing.
We have a stream per aggregate, process manager, and projection. A “state” of the domain is simply this set of streams, with their events, at a certain point in time. I already have all the mechanisms in place to record the stream states, which was easy.
My plan was, for each stored stream, to delete the existing one and recreate it by appending the stored events. However, I quickly encountered the “Event stream ‘…’ is deleted” error.
In reading up, I understand the issues with HTTP caching and tombstoning. I also understand the recommended solutions of creating new streams with different names.
However, the IDs we are using are present in message headers and other places, and it would be a nightmare to try and migrate them. That simply isn’t an option, nor is it semantically valuable.
I would like to manipulate EventStore streams at a mechanical level. Is this possible with the current binaries or any available build?
Thanks for any help!