Hi,
we are using Axon Framework in a productive application and have recently realized that we have chosen a wrong name (from the business point of view) for an event class. Therefore we decided to change the class name and the name of a single event attribute. Since the application is already running for a while there are already some hundreds of thousands of these events.
At the moment we are discussing how to do the event class renaming. From our perspective there are at least three different approaches:
- Rename class and attribute and create an Upcaster that maps the ‘old’ events to the ones with the new name.
- Create a new event class and new handler methods, keep the old event and handler methods and let the aggregate apply the new event.
- Do the renaming, stop the application, change the event payload type directly in the database and restart the modified application
Are there any best practices out there that could help us to decide which way to go?
Thanks in advance,
Torsten
BTW: We are using Jackson for the payload serialization, a PostgreSQL as event store and a MongoDB for the projections.