A transformation component converts events between schema versions so producers and consumers can evolve without making every client implement compatibility rules. It centralizes conversion in an intermediary rather than requiring custom compatibility logic in each client. section 6.2.5
The component is especially useful when compatibility rules cannot accommodate a breaking change, such as renaming fields or altering data types. It can translate new events into an older format for legacy consumers or, less often, convert legacy events into a new format. section 6.2.5
A practical migration design has several constraints:
- Create separate Kafka topics or channels for each event version. section 6.2.5
- Run old and new producers, consumers, and channels simultaneously while the new version is validated. section 6.2.5
- Retire the old path after dependent consumers have moved, keeping the transformation service temporary where possible. section 6.2.5 section 6.7
Keeping Consumer V1 running
A new producer emits a changed event schema while Consumer V1 still expects the old format. A transformation service reads the new channel, produces the legacy representation on a separate channel, and allows the old consumer to continue operating until migration is complete. section 6.2.5
Figure 6.10 The transformation to the old format is handled by a component in the middle. This assumes the creation of the new channel.
Use the migration diagram to trace the intermediary transformation and the new channel required for the old format. section 6.2.5
