An implicit contract is an unstated agreement about the structure and representation of data exchanged by otherwise independent software components. In event streaming, a producer serializes an object for a topic, while a consumer expects to deserialize the same object type. section 3.1
Figure 3.1 The conversion of objects to bytes and bytes to objects happens at the client level.
Use the conversion diagram to separate client-side object serialization from broker-level message transport and consumer-side deserialization. section 3.1
The contract becomes operational through three related concerns:
- A producer and consumer can remain agnostic of each other, but both must agree on the event domain object's representation. section 3.1
- Changing a field from java.util.Date to long can break downstream consumers when the expected field type changes unexpectedly. section 6.4.5
- Schemas and Schema Registry make the agreement explicit enough to coordinate changes and perform compatibility checks. section 6.4.5
Schema-aware Kafka Streams application
Create a provided Serde, configure it with the Schema Registry URL, and use it in the Kafka Streams application. Kafka Streams follows the same schema-evolution and compatibility rules because it contains producer and consumer clients. section 6.4.5
