liveBook · Manning

Transformation component

As explained in Kafka for Architects

A transformation component is a software component that converts data from one structural or representational format into another.

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.
A diagram of a diagram of a customer service

AI-generated content may be incorrect.

Use the migration diagram to trace the intermediary transformation and the new channel required for the old format. section 6.2.5

How Kafka for Architects covers it

How deep it goes
Explains conversion direction, separate channels, and phased retirement, but stops short of implementation details.
Examples
Uses Consumer V1, legacy and new event formats, separate Kafka topics, and parallel deployment during validation.
What it assumes
Assumes producers, consumers, event schemas, schema versions, and Kafka topics; does not require client-specific compatibility logic.
What you can do after
Evaluate when to centralize schema conversion and plan a phased migration without immediate service downtime.
How it connects
Connects schema evolution with data contracts, backward compatibility, forward compatibility, and Kafka topics.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka for Architects. The section links point to the parts of the book it draws on.