Wersjonowanie zdarzeń
Zdarzenia zostają zapisane na lata, a kod, który je czyta, ciągle się zmienia. Dodajesz wymagane pole albo zmieniasz nazwę właściwości, a stare zdarzenia nadal muszą się poprawnie wczytać. Zmiany w zdarzeniach nie są tak straszne, jak się o nich mówi, ale trzeba je zaplanować.
Pierwszy artykuł pokazuje najtańszą opcję: projektować tak, żeby rzadko ich potrzebować. Jeśli streamy są krótkie, stare formaty zdarzeń same znikają. Kolejne omawiają proste, powtarzalne sposoby obsługi zmian, od dodania pola po przekształcanie starych zdarzeń do nowej postaci przy odczycie. Zobaczysz też, jak wyłapać niekompatybilną zmianę w teście jednostkowym, zanim trafi na produkcję, i jak kontrolować sposób zapisu i odczytu zdarzeń.
Zacznij od pierwszego artykułu. Może oszczędzić ci większości pracy opisanej w pozostałych.

How to (not) do the events versioning?
2020-12-23Developers that are not running a system in production might call themselves lucky. They can live in their perfect world. It is a world where there are no problems…
Simple patterns for events schema versioning
2021-12-08Events (schema) versioning is a boogeyman for people learning Event Sourcing. They’re a spooky tale told at the campfire. There’s a truth in it, as migrations are always…
Announcing Strictland - new contract testing library for message compatibility
2026-06-15I just released something. It’s called Strictland. And it’s a contract testing library. Why did I do it? Before I go further, if you can’t wait, you can check it on…
Mapping event type by convention
2022-11-27Events are an essential block of Event-Driven Architecture. They represent business facts that happened in our system. We can use them to integrate business workflow…
Explicit events serialisation in Event Sourcing
2022-12-23Events serialisation is an intriguing topic. On the one hand, it’s part of the campfire spooky tales, so (in)famous events versioning. On the other, we’re just taking…
Event Versioning with Marten
2022-09-07War never changes; migrations are always complex. It’s always a mind gymnastics and searching for risks and what may go wrong. Sometimes we try to cheat, ignore the…