Rails Event Store provides custom mappers to handle event schema evolution without breaking historical data. When business terminology changes (like renaming 'Refunds' to 'Returns'), you can create transformation pipelines that map old event names to new ones and transform payload data during deserialization. This approach maintains backward compatibility with immutable historical events while allowing new code to use updated terminology. The solution involves custom mappers in the RES transformation pipeline, handling both event class name changes and payload field transformations.

7m read timeFrom blog.arkency.com
Post cover image
Table of contents
The problem we facedSimple solutions don’t workThe Rails Event Store contextOur solution: custom event transformation pipelineWhy not use RES upcast feature?

Sort: