So I realize that you don’t wanna be able to change event data in an append-only store like this, but in terms of development and maintenance, I find this to be an issue that I hope there’s a solution for. Simply put, I developing a system and testing it, so events are going into the event store. Then i refactor the solution as I learn more about it, and some of the event object might end up moving. Now, when I replay the event store, nothing will deserialize because the qualified type names have changed since the files moved. My first instinct is to be able to find those events and update the $type field to point to the correct file.
A couple things about how things are going into the ES
- I’m using json.net to serialize the event object before converting it to byte[] and this is what gets stored
- I have JsonSerializationSettings set to include $type for each object to make it easier to deserialize the object when I don’t know what the object type is at runtime.
- This places a FQN into the field. I assume, it’s used in a Type.GetType(string) type fashion under the hood
Is there any way to fix this?